function user_badges_for_user in User Badges 5
Same name and namespace in other branches
- 6.2 user_badges.module \user_badges_for_user()
- 6 user_badges.module \user_badges_for_user()
- 7 user_badges.module \user_badges_for_user()
- 7.2 user_badges.module \user_badges_for_user()
- 7.3 user_badges.module \user_badges_for_user()
Returns HTML representation of user badges for given user $array is array defining criteria for user_load() most common use will be: user_badges_for_user(array('uid'=>123));
File
- ./
user_badges.module, line 819 - @brief User Badges module file
Code
function user_badges_for_user($array) {
$account = user_load($array);
foreach ((array) $account->badges as $badge) {
$badges[] = theme('user_badge', $badge);
}
if ($badges) {
return theme('user_badge_group', $badges);
}
}