function onEndRevokeRole($profile, $role) { $modlog = new ModLog(); $modlog->id = UUID::gen(); $modlog->profile_id = $profile->id; $cur = common_current_user(); if (!empty($cur)) { $modlog->moderator_id = $cur->id; } $modlog->role = $role; $modlog->is_grant = 0; $modlog->created = common_sql_now(); $modlog->insert(); return true; }
function onEndRevokeRole($profile, $role) { $modlog = new ModLog(); $modlog->id = UUID::gen(); $modlog->profile_id = $profile->id; $scoped = Profile::current(); if ($scoped instanceof Profile) { $modlog->moderator_id = $scoped->getID(); } $modlog->role = $role; $modlog->is_grant = 0; $modlog->created = common_sql_now(); $modlog->insert(); return true; }