function user_stats_preprocess_author_pane in User Stats 5
Same name and namespace in other branches
- 6 user_stats.author-pane.inc \user_stats_preprocess_author_pane()
- 7 user_stats.author-pane.inc \user_stats_preprocess_author_pane()
Implementation of hook_preprocess_author_pane(). A preprocess function for the author pane used by Advanced Forum and Advanced Profile Kit.
File
- ./
user_stats.module, line 688 - User Stats provides commonly requested user statistics for themers. These are:
Code
function user_stats_preprocess_author_pane(&$variables) {
$account_id = $variables['account']->uid;
if ($account_id != 0) {
if (user_access('View statistics')) {
$variables['user_stats_posts'] = user_stats_get_stats('post_count', $account_id);
}
// IP part has access check built in.
$ip = user_stats_get_stats('ip_address', $account_id);
$variables['user_stats_ip'] = $ip;
}
}