function user_badges_rules_condition_has_badge in User Badges 7.4
Same name and namespace in other branches
- 7.3 user_badges.rules.inc \user_badges_rules_condition_has_badge()
Condition: User has badge.
1 string reference to 'user_badges_rules_condition_has_badge'
- user_badges_rules_condition_info in ./
user_badges.rules.inc - Implements hook_rules_condition_info().
File
- ./
user_badges.rules.inc, line 162 - user_badges.rules.inc
Code
function user_badges_rules_condition_has_badge($badge_id, $user) {
$has_badge = FALSE;
$badges = user_badges_get_badges($user->uid);
if (isset($badges[$badge_id])) {
$has_badge = TRUE;
}
return $has_badge;
}