function advanced_forum_statistics_latest_users in Advanced Forum 6.2
Same name and namespace in other branches
- 7.2 advanced_forum.module \advanced_forum_statistics_latest_users()
Return the newest X active (not blocked) users, linked to their profiles.
1 call to advanced_forum_statistics_latest_users()
- advanced_forum_preprocess_advanced_forum_statistics in includes/
theme.inc - Preprocesses template variables for the forum statistics template.
File
- ./
advanced_forum.module, line 766 - Enables the look and feel of other popular forum software.
Code
function advanced_forum_statistics_latest_users() {
$number_to_fetch = 5;
// @TODO: Make this a setting.
$sql = 'SELECT uid, name FROM {users} WHERE status = 1 AND access > 0 ORDER BY created DESC';
$latest_users = db_query_range($sql, NULL, NULL, $number_to_fetch);
while ($account = db_fetch_object($latest_users)) {
$list[] = theme('username', $account);
}
return $list;
}