Index: user_badges.module =================================================================== --- user_badges.module (revision 165) +++ user_badges.module (working copy) @@ -608,6 +608,17 @@ $badges[$badge->bid] = $badge; } } + + if (is_numeric($uid)) { + // Call hook to allow modules to add/remove badges. + // Doesn't user module_invoke_all() as argument must be passed by reference. + foreach (module_list() as $module) { + $function = $module .'_user_badges'; + if (function_exists($function)) { + $function(&$badges, $uid); + } + } + } } return $badges;