(bug 15479) action=login no longer sets wait parameter when result="Throttled"; regre...
authorRoan Kattouw <catrope@users.mediawiki.org>
Thu, 4 Sep 2008 19:48:48 +0000 (19:48 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Thu, 4 Sep 2008 19:48:48 +0000 (19:48 +0000)
includes/api/ApiLogin.php

index 1726ef1..108ce81 100644 (file)
@@ -113,7 +113,9 @@ class ApiLogin extends ApiBase {
                                $result['details'] = 'Your IP address is blocked from account creation';
                                break;
                        case LoginForm :: THROTTLED :
+                               global $wgPasswordAttemptThrottle;
                                $result['result'] = 'Throttled';
+                               $result['wait'] = $wgPasswordAttemptThrottle['seconds'];
                                break;
                        default :
                                ApiBase :: dieDebug(__METHOD__, "Unhandled case value: {$authRes}");