ez.no / exponential / documentation / reference / data fetching / user / logged_in_list
fetch( 'user', 'logged_in_list',
hash( [ 'sort_by', sort_by,]
[ 'offset', offset, ]
[ 'limit', limit ] ) )
| Name | Type | Description | Required |
|---|---|---|---|
| sort_by | mixed | Which field to sort by | No. |
| offset | integer | Which offset to start fetching from | No. |
| limit | integer | The maximum number of users to fetch | No. |
An associative array with users who are logged-in
Will return an associative array with logged-in users who are considered active.
The key in the array will be the user ID and the value will be the user name.
A user is considered active if the last access time is less than the activity timeout, the default is 1 hour and can be configured in site.ini ( ActivityTimeout).
The sort_by is an array with sorting types, each type is an array with the first element being the sort field and the second being the direction (boolean).
The following sorting fields are currently supported
Note: It is usually a good idea to include a limit since the number of users can get long.
See also logged_in_users which does the same but returns an array with eZUser objects.
The current users are logged in to the system {section var=user loop=fetch( 'user', 'logged_in_list', hash( 'limit', 10 ) )} {$user} {/section}
Comments