Follow-up r69898: fix Undefined variable: wgCookiePrefix in /ApiLogin.php on line 94
authorSiebrand Mazeland <siebrand@users.mediawiki.org>
Tue, 3 Aug 2010 20:05:38 +0000 (20:05 +0000)
committerSiebrand Mazeland <siebrand@users.mediawiki.org>
Tue, 3 Aug 2010 20:05:38 +0000 (20:05 +0000)
includes/api/ApiLogin.php

index c83b8c3..7f518b6 100644 (file)
@@ -68,9 +68,12 @@ class ApiLogin extends ApiBase {
                }
 
                $loginForm = new LoginForm( $req );
+
+               global $wgCookiePrefix;
+
                switch ( $authRes = $loginForm->authenticateUserData() ) {
                        case LoginForm::SUCCESS:
-                               global $wgUser, $wgCookiePrefix;
+                               global $wgUser;
 
                                $wgUser->setOption( 'rememberpassword', 1 );
                                $wgUser->setCookies();