Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.



Fetches the number of users that are logged in.


fetch( 'user', 'logged_in_count' )


The number of logged in users (as an integer).


This function counts the number of logged in users (both anonymous and non-anonymous) and returns that count as an integer. A user is considered to be active / logged in if the last access time is within the range of the activity timeout. The timeout can be set using the "ActivityTimeout" directive in a configuration override for "site.ini". The default timeout is one hour.


Example 1

{def $users=fetch( 'user', 'logged_in_count' )}
There are currently {$users} active users on the system.

Outputs the number of currently active / logged in users.

Balazs Halasy (01/06/2004 3:42 pm)

Balazs Halasy (06/06/2005 11:52 am)


There are no comments.