var $mAction, $mCreateaccount, $mCreateaccountMail, $mMailmypassword;
var $mLoginattempt, $mRemember, $mEmail;
+ /**
+ * Constructor
+ * @param webrequest $request A webrequest object passed by reference
+ */
function LoginForm( &$request ) {
global $wgLang, $wgAllowRealName, $wgEnableEmail;
global $wgEmailAuthentication;
if ( is_null( $u ) ||
( '' == $name ) ||
$wgUser->isIP( $name ) ||
- (strpos( $name, "/" ) !== false) ||
+ (strpos( $name, '/' ) !== false) ||
(strlen( $name ) > $wgMaxNameChars) ||
($wgUseLatin1 && preg_match( "/[\x80-\xA0]/", $name )) ||
ucFirst($name) != $u->getName() )
/**
+ * @param string $msg Message that will be shown on success.
* @access private
*/
function successfulLogin( $msg ) {
$wgOut->returnToMain();
}
+ /** */
function userNotPrivilegedMessage() {
- global $wgOut, $wgUser, $wgLang;
+ global $wgOut;
$wgOut->setPageTitle( wfMsg( 'whitelistacctitle' ) );
$wgOut->setRobotpolicy( 'noindex,nofollow' );
$template->set( 'userealname', $wgAllowRealName );
$template->set( 'useemail', $wgEnableEmail );
$template->set( 'useemailauthent', $wgEmailAuthentication );
- $template->set( 'remember', $wgUser->getOption( 'rememberpassword' ) );
+ $template->set( 'remember', $wgUser->getOption( 'rememberpassword' ) or $this->mRemember );
$wgOut->setPageTitle( wfMsg( 'userlogin' ) );
$wgOut->setRobotpolicy( 'noindex,nofollow' );