/** * Execute the job * * @return bool */ public function run() { $username = $this->params['username']; $by = $this->params['by']; $wikis = $this->params['wikis']; $suppress = $this->params['suppress']; $reason = $this->params['reason']; $user = new CentralAuthUser($username); if (!$user->exists()) { wfDebugLog('suppressjob', "Requested to suppress non-existent user {$username} by {$by}."); } foreach ($wikis as $wiki) { $user->doLocalSuppression($suppress, $wiki, $by, $reason); wfDebugLog('suppressjob', ($suppress ? 'S' : 'Uns') . "uppressed {$username} at {$wiki} by {$by} via job queue."); } return true; }