use eZUser\eZUser; // Get user credentials from form $username = $_POST['username']; $password = $_POST['password']; // Authenticate user $currentUser = eZUser::login($username, $password); if (!$currentUser) { // Authentication failed echo 'Invalid username or password'; } else { // Authentication successful echo 'Welcome ' . $currentUser->attribute('name'); }
use eZUser\eZUser; // Get current user object $currentUser = eZUser::currentUser(); // Get user attributes $username = $currentUser->attribute('login'); $name = $currentUser->attribute('name'); $email = $currentUser->attribute('email');In both examples, we can see that the code is using the `eZUser` class to perform user management tasks. This indicates that the package library is eZUser.