Wednesday 18 May 2011 7:26:44 am
I tried several methods to check if user is logged in. The most convenient method would be:
$userId = eZUser::currentUserID();
eZUser::isUserLoggedIn($userId);
But this returns true even if no user is logged in and $userId is '10' (= anonymous). I even tried calling
eZUser::cleanupCache();
eZUser::clearSessionCache(); before. Same result. So the only reliable method to get loggedin-information seems to be:
$user = eZUser::currentUser();
$user->isLoggedIn();
---------------------------------------
http://www.lbm-services.de
|