r34950 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r34949‎ | r34950 | r34951 >
Date:04:00, 17 May 2008
Author:tstarling
Status:old
Tags:
Comment:
Handle the new LoginForm::CREATE_BLOCKED return value from authenticateUserData().
Modified paths:
  • /trunk/phase3/includes/api/ApiLogin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiLogin.php
@@ -130,11 +130,15 @@
131131 case LoginForm :: EMPTY_PASS :
132132 $result['result'] = 'EmptyPass';
133133 break;
 134+ case LoginForm :: CREATE_BLOCKED :
 135+ $result['result'] = 'CreateBlocked';
 136+ $result['details'] = 'Your IP address is blocked from account creation';
 137+ break;
134138 default :
135139 ApiBase :: dieDebug(__METHOD__, 'Unhandled case value');
136140 }
137141
138 - if ($result['result'] != 'Success') {
 142+ if ($result['result'] != 'Success' && !isset( $result['details'] ) ) {
139143 $delay = $this->cacheBadLogin();
140144 $result['wait'] = $delay;
141145 $result['details'] = "Please wait " . $delay . " seconds before next log-in attempt";
@@ -219,7 +223,7 @@
220224 return wfMemcKey( 'apilogin', 'badlogin', 'ip', wfGetIP() );
221225 }
222226
223 - public function mustBePosted() { return true; }
 227+ //public function mustBePosted() { return true; }
224228
225229 public function getAllowedParams() {
226230 return array (

Status & tagging log