function og_role_watchdog_og_role_revoke in Role Watchdog 7
Same name and namespace in other branches
- 7.2 modules/og_role_watchdog/og_role_watchdog.module \og_role_watchdog_og_role_revoke()
File
- modules/
og_role_watchdog/ og_role_watchdog.module, line 96 - Logs changes to user roles.
Code
function og_role_watchdog_og_role_revoke($gid, $uid, $rid) {
// When a user is denied membership to a group, og_role_watchdog_og_membership_delete
// will be called, and then og_role_watchdog_og_role_revoke will be called with
// $rid == 1 (OG_ANONYMOUS_ROLE).
$roles = array_flip(og_get_global_roles());
$nonmember_rid = $roles[OG_ANONYMOUS_ROLE];
if ($rid != $nonmember_rid) {
$account = user_load($uid);
_og_role_watchdog_process_role_changes($account, array(), array(
$rid,
), $gid);
}
}