This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » Developer » eZUser::isUserLoggedIn returns true...

eZUser::isUserLoggedIn returns true for anonymous

eZUser::isUserLoggedIn returns true for anonymous

Wednesday 18 May 2011 4:26:44 pm - 2 replies

I tried several methods to check if user is logged in.

The most convenient method would be:

$userId = eZUser::currentUserID();

But this returns true even if no user is logged in and $userId is '10' (= anonymous). I even tried calling
before. Same result.

So the only reliable method to get loggedin-information seems to be:

$user = eZUser::currentUser();

Modified on Wednesday 18 May 2011 4:34:08 pm by Horst Lindlbauer

Wednesday 18 May 2011 11:54:02 pm

Version? There was something like this in 4.4 that was fixed but might not be the same issue.

Thursday 19 May 2011 12:42:36 pm

We are using 4.3.0


You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from