Saturday 30 May 2009 5:44:29 am
I want to restrict a function for logged in user only. I thougt the eZUser::isLoggedIn() will help me for doing this.
if (eZUser::isLoggedIn())
{
myCustomFunction();
}
But whatever i do (loged in or loged out), eZUser::isLoggedIn() is always true. It seems to me, that the anonymous user is also a "isLoggedIn" member. When i am logged out, the code...
$user = eZUser::currentUser();
$userLogin = $user->attribute( 'login' );
echo $userLogin;
... will print "anonymous". When i am logged in it will print the name of the loged in user, for example "admin".
Is this a bug, or is there another function which i can restrict a function for logged in users? >> ezPublish 4.1.0
|