/** * hook * * @static */ public static function abortNewAccount($user, &$abortError) { wfProfileIn(__METHOD__); self::$checkEmail = true; $ret = self::blockCheck($user); if ($ret === false) { $abortError = wfMsg(self::$typeBlock == 'email' ? 'phalanx-email-block-new-account' : 'phalanx-user-block-new-account'); } wfProfileOut(__METHOD__); return $ret; }
/** * @desc Checks if the user/email is blocked in phalanx and sets the proper response if so * * @param $user * @return bool */ private function isBlockedByPhalanx($user) { $abortError = ''; // abortNewAccount returns false if the user/email is blocked, true if they are not blocked $blockedByPhalanx = !PhalanxUserBlock::abortNewAccount($user, $abortError); if ($blockedByPhalanx) { $this->setResponseFields('error', $abortError, 'email'); } return $blockedByPhalanx; }