return;
} elseif( $this->mPosted ) {
if( $this->mCreateaccount ) {
- return $this->addNewAccount();
+ $this->addNewAccount();
+ return;
} elseif ( $this->mCreateaccountMail ) {
- return $this->addNewAccountMailPassword();
+ $this->addNewAccountMailPassword();
+ return;
} elseif ( ( 'submitlogin' == $this->mAction ) || $this->mLoginattempt ) {
- return $this->processLogin();
+ $this->processLogin();
+ return;
}
}
$this->mainLoginForm( '' );
/**
* @private
- * @return bool|void
+ * @return bool
*/
function addNewAccount() {
global $wgUser, $wgEmailAuthentication, $wgLoginLanguageSelector;
# Create the account and abort if there's a problem doing so
$u = $this->addNewAccountInternal();
if( $u == null ) {
- return;
+ return false;
}
# If we showed up language selection links, and one was in use, be
wfRunHooks( 'AddNewAccount', array( $u, false ) );
$u->addNewUserLogEntry();
if( $this->hasSessionCookie() ) {
- return $this->successfulCreation();
+ $this->successfulCreation();
} else {
- return $this->cookieRedirectCheck( 'new' );
+ $this->cookieRedirectCheck( 'new' );
}
} else {
# Confirm that the account was created
$out->returnToMain( false, $this->getTitle() );
wfRunHooks( 'AddNewAccount', array( $u, false ) );
$u->addNewUserLogEntry( false, $this->mReason );
- return true;
}
+ return true;
}
/**
$userLang = Language::factory( $code );
$wgLang = $userLang;
$this->getContext()->setLanguage( $userLang );
- return $this->successfulLogin();
+ $this->successfulLogin();
} else {
- return $this->cookieRedirectCheck( 'login' );
+ $this->cookieRedirectCheck( 'login' );
}
break;
case self::NOT_EXISTS:
if( $this->getUser()->isAllowed( 'createaccount' ) ) {
$this->mainLoginForm( $this->msg( 'nosuchuser',
- wfEscapeWikiText( $this->mUsername ) )->parse() );
+ wfEscapeWikiText( $this->mUsername ) )->parse() );
} else {
$this->mainLoginForm( $this->msg( 'nosuchusershort',
wfEscapeWikiText( $this->mUsername ) )->text() );
/**
* Display a "login successful" page.
+ * @param $msgname string
+ * @param $injected_html string
*/
private function displaySuccessfulLogin( $msgname, $injected_html ) {
$out = $this->getOutput();
/**
* @private
- * @return void
*/
function cookieRedirectCheck( $type ) {
$titleObj = SpecialPage::getTitleFor( 'Userlogin' );
}
$check = $titleObj->getFullURL( $query );
- return $this->getOutput()->redirect( $check );
+ $this->getOutput()->redirect( $check );
}
/**
function onCookieRedirectCheck( $type ) {
if ( !$this->hasSessionCookie() ) {
if ( $type == 'new' ) {
- return $this->mainLoginForm( $this->msg( 'nocookiesnew' )->parse() );
+ $this->mainLoginForm( $this->msg( 'nocookiesnew' )->parse() );
} elseif ( $type == 'login' ) {
- return $this->mainLoginForm( $this->msg( 'nocookieslogin' )->parse() );
+ $this->mainLoginForm( $this->msg( 'nocookieslogin' )->parse() );
} else {
# shouldn't happen
- return $this->mainLoginForm( $this->msg( 'error' )->text() );
+ $this->mainLoginForm( $this->msg( 'error' )->text() );
}
} else {
- return $this->successfulLogin();
+ $this->successfulLogin();
}
}