function user_stats_cache_get in User Stats 6
Same name and namespace in other branches
- 7 user_stats.module \user_stats_cache_get()
Return data from the non-persistent User Stats cache. Single values are returned according to type of statistic and unique user id.
Parameters
$type: The type of statistic to retrieve, this corresponds to the statistic types used by user_stats_get_stats().
$uid: Unique ID of the user who's statistic is being retrieved.
Return value
A single value, representing the statistic $type where the unique user id is $uid. Or FALSE if there is no value in the cache for this combination of $type and $uid.
See also
1 call to user_stats_cache_get()
- user_stats_get_stats in ./
user_stats.module - Returns user stats.
File
- ./
user_stats.module, line 216 - User Stats provides commonly requested user statistics for themers. These are:
Code
function user_stats_cache_get($type, $uid) {
$user_stats_cache = user_stats_cache_set();
if (isset($user_stats_cache[$uid][$type])) {
return $user_stats_cache[$uid][$type];
}
else {
return FALSE;
}
}