$u->setEmail( $this->mEmail );
$u->setRealName( $this->mRealName );
- SessionManager::singleton()->invalidateSessionsForUser( $u );
+ $u->setToken();
Hooks::run( 'LocalUserCreated', [ $u, $autocreate ] );
$oldUser = $u;
# Run any hooks; display injected HTML if any, else redirect
$currentUser = $this->getUser();
$injected_html = '';
- Hooks::run( 'UserLoginComplete', [ &$currentUser, &$injected_html ] );
+ $direct = RequestContext::getMain()->getRequest()->wasPosted();
+ Hooks::run( 'UserLoginComplete', [ &$currentUser, &$injected_html, $direct ] );
if ( $injected_html !== '' ) {
$this->displaySuccessfulAction( 'success', $this->msg( 'loginsuccesstitle' ),
$currentUser = $this->getUser();
$injected_html = '';
$welcome_creation_msg = 'welcomecreation-msg';
+ $direct = RequestContext::getMain()->getRequest()->wasPosted();
- Hooks::run( 'UserLoginComplete', [ &$currentUser, &$injected_html ] );
+ Hooks::run( 'UserLoginComplete', [ &$currentUser, &$injected_html, $direct ] );
/**
* Let any extensions change what message is shown.
}
SessionManager::getGlobalSession()->resetId();
+ SessionManager::getGlobalSession()->resetAllTokens();
}
/**