예제 #1
0
 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;
 }
예제 #2
0
 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;
 }