From: Tim Starling Date: Sat, 17 May 2008 04:00:26 +0000 (+0000) Subject: Handle the new LoginForm::CREATE_BLOCKED return value from authenticateUserData(). X-Git-Tag: 1.31.0-rc.0~47582 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/bilan.php?a=commitdiff_plain;h=47479fe6cf8217dfa70df2d9ce43d241b176aa16;p=lhc%2Fweb%2Fwiklou.git Handle the new LoginForm::CREATE_BLOCKED return value from authenticateUserData(). --- diff --git a/includes/api/ApiLogin.php b/includes/api/ApiLogin.php index 6ecf46490f..2b603b37ab 100644 --- a/includes/api/ApiLogin.php +++ b/includes/api/ApiLogin.php @@ -130,11 +130,15 @@ class ApiLogin extends ApiBase { case LoginForm :: EMPTY_PASS : $result['result'] = 'EmptyPass'; break; + case LoginForm :: CREATE_BLOCKED : + $result['result'] = 'CreateBlocked'; + $result['details'] = 'Your IP address is blocked from account creation'; + break; default : ApiBase :: dieDebug(__METHOD__, 'Unhandled case value'); } - if ($result['result'] != 'Success') { + if ($result['result'] != 'Success' && !isset( $result['details'] ) ) { $delay = $this->cacheBadLogin(); $result['wait'] = $delay; $result['details'] = "Please wait " . $delay . " seconds before next log-in attempt"; @@ -219,7 +223,7 @@ class ApiLogin extends ApiBase { return wfMemcKey( 'apilogin', 'badlogin', 'ip', wfGetIP() ); } - public function mustBePosted() { return true; } + //public function mustBePosted() { return true; } public function getAllowedParams() { return array (