function user_stats_isset in User Stats 6
Same name and namespace in other branches
- 7 user_stats.module \user_stats_isset()
Checks whether a statistic is set for a given user.
Parameters
$uid: User ID of the user who's statistics should be checked.
$statistic: What statistic to check.
3 calls to user_stats_isset()
- user_stats_get_stats in ./
user_stats.module - Returns user stats.
- user_stats_login_count_update in ./
user_stats.module - Manage the login count of a given user.
- user_stats_post_count_update in ./
user_stats.module - Manage the post count of a given user.
File
- ./
user_stats.module, line 677 - User Stats provides commonly requested user statistics for themers. These are:
Code
function user_stats_isset($statistic, $uid) {
$result = db_result(db_query("SELECT COUNT(*) FROM {user_stats_values}\n WHERE uid = %d AND name = '%s'", $uid, $statistic));
if ($result > 0) {
return TRUE;
}
return FALSE;
}