$current_user = eZUser::currentUser(); if ($current_user instanceof eZUser) { echo $current_user->attribute('login'); } else { echo "Not logged in"; }
$current_user = eZUser::currentUser(); if ($current_user->hasAccessTo('content', 'read') { // user has access to read content } else { // user does not have access }The eZUser class is part of the eZ Publish Platform library, which is a content management system written in PHP.