<?php
-
/**
- * Created on Sep 19, 2006
- *
* API for MediaWiki 1.8+
*
+ * Created on Sep 19, 2006
+ *
* Copyright © 2006-2007 Yuri Astrakhan <Firstname><Lastname>@gmail.com,
* Daniel Cannon (cannon dot danielc at gmail dot com)
*
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
*/
if ( !defined( 'MEDIAWIKI' ) ) {
}
$loginForm = new LoginForm( $req );
+
+ global $wgCookiePrefix, $wgUser, $wgPasswordAttemptThrottle;
+
switch ( $authRes = $loginForm->authenticateUserData() ) {
case LoginForm::SUCCESS:
- global $wgUser, $wgCookiePrefix;
-
$wgUser->setOption( 'rememberpassword', 1 );
$wgUser->setCookies();
break;
case LoginForm::THROTTLED:
- global $wgPasswordAttemptThrottle;
$result['result'] = 'Throttled';
$result['wait'] = intval( $wgPasswordAttemptThrottle['seconds'] );
break;