Share » Forums » Developer » Fetching logged in users using PHP

Fetching logged in users using PHP

Fetching logged in users using PHP

Thursday 14 January 2010 12:53:41 am - 3 replies

Modified on Wednesday 24 March 2010 1:17:57 am by Damien MARTIN

Author Message

Gaetano Giunta

Thursday 14 January 2010 1:14:22 am

If speed is your concern, I'd suggest going for a custom sql request; With many users the above code will be doing a huge amount of queries, wasting time and memory...

Principal Consultant International Business
Member of the Community Project Board

Bertrand Dunogier

Thursday 14 January 2010 1:21:30 am

I'm not sure why this would fail, but it might be more efficient to use eZUser::fetchLoggedInList(). But maybe you need to filter this list out by group, in which case custom code would indeed be required.

Bertrand Dunogier
eZ Systems Engineering, Lyon


Thursday 14 January 2010 1:46:42 am


I would like to create custom SQL queries but I don't have the time for now to look at the database.
I looked some months ago for a diagramm with all the tables and relations of the eZ database but unsuccessfully.


eZUser::fetchLoggedInList() works very well for what I want to do. I just now have to fetch using eZContentObject::fetch() and all the datas I need are there.
I suppose it would be faster with this method (no more need to fetch eZUser).
I don't know when I haven't tried this method before...

Thank you very much guys !

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

36 542 Users on board!

Forums menu