function visitors_block_registered_user in Visitors 8
Same name and namespace in other branches
- 7.0 visitors.block.inc \visitors_block_registered_user()
Display registered users count to visitors block.
Parameters
$list_items: array associative array of variables, use for theme function
1 call to visitors_block_registered_user()
- theme_visitors_block_view in ./
visitors.block.inc - Implement a theme function for block output.
File
- ./
visitors.block.inc, line 87 - Display current visitor block.
Code
function visitors_block_registered_user(&$list_items) {
if (variable_get('visitors_registered_user', 1)) {
$query = 'SELECT COUNT(*) FROM {users} WHERE uid <> 0';
$registered_user = db_query($query)
->fetchField();
$list_items[] = t('Registered Users: %registered_user', array(
'%registered_user' => $registered_user,
));
}
}