// Allow modification of redirect behavior
Hooks::run( 'PostLoginRedirect', [ &$returnTo, &$returnToQuery, &$type ] );
- $returnToTitle = Title::newFromText( $returnTo ) ?: Title::newMainPage();
+ $returnToTitle = Title::newFromText( $returnTo ) ?: Title::newMainPage();
if ( $wgSecureLogin && !$stickHTTPS ) {
$options = [ 'http' ];
}
if ( $type === 'successredirect' ) {
- $redirectUrl = $returnToTitle->getFullURL( $returnToQuery, false, $proto );
+ $redirectUrl = $returnToTitle->getFullUrlForRedirect( $returnToQuery, $proto );
$this->getOutput()->redirect( $redirectUrl );
} else {
$this->getOutput()->addReturnTo( $returnToTitle, $returnToQuery, null, $options );