global $wgSecureLogin;
if (
- $this->mType != 'signup' &&
+ $this->mType !== 'signup' &&
$wgSecureLogin &&
WebRequest::detectProtocol() !== 'https'
) {
} else {
$user->invalidateCache();
}
- $user->setCookies( null, $wgSecureLogin && !$this->mStickHTTPS ? false : null );
+
+ if( $wgSecureLogin && !$this->mStickHTTPS ) {
+ $user->setCookies( null, false );
+ } else {
+ $user->setCookies();
+ }
self::clearLoginToken();
// Reset the throttle
$returnToTitle = Title::newMainPage();
}
- if( $wgSecureLogin && !$this->mStickHTTPS ) {
+ if ( $wgSecureLogin && !$this->mStickHTTPS ) {
$options = array( 'http' );
$proto = PROTO_HTTP;
} else {