From: Florian Schmidt Date: Wed, 21 Sep 2016 20:45:32 +0000 (+0200) Subject: Don't show warning header for non-standard workflows on login-continue X-Git-Tag: 1.31.0-rc.0~4995^2 X-Git-Url: http://git.cyclocoop.org/%24dirpuce/%27%241//%27%40script%40/%27?a=commitdiff_plain;h=b09dfce2382987a5f9139cb7595b214ef7b8fd46;p=lhc%2Fweb%2Fwiklou.git Don't show warning header for non-standard workflows on login-continue When a user needs/wants to login again (reauthentication or user account switch), the Login special page shows a header to explain what happened ("already logged in" or "need to re-authenticate"). For now, the form also displays this header for a continued login workflow (e.g. when the user needs to enter secondary auth- entication data, like a one time password). This is misleading, as the user already knows what and why he has to login (again). Other error/warning messages are maybe not as visible as they should be. This change omits the header message for the login-continue auth action. Bug: T146317 Change-Id: I2115bbe7965e8d0326f71872a4d33767dd0f956b --- diff --git a/includes/specialpage/LoginSignupSpecialPage.php b/includes/specialpage/LoginSignupSpecialPage.php index 275e12191e..aa5bb4e98c 100644 --- a/includes/specialpage/LoginSignupSpecialPage.php +++ b/includes/specialpage/LoginSignupSpecialPage.php @@ -508,7 +508,11 @@ abstract class LoginSignupSpecialPage extends AuthManagerSpecialPage { } // warning header for non-standard workflows (e.g. security reauthentication) - if ( !$this->isSignup() && $this->getUser()->isLoggedIn() ) { + if ( + !$this->isSignup() && + $this->getUser()->isLoggedIn() && + $this->authAction !== AuthManager::ACTION_LOGIN_CONTINUE + ) { $reauthMessage = $this->securityLevel ? 'userlogin-reauth' : 'userlogin-loggedin'; $submitStatus->warning( $reauthMessage, $this->getUser()->getName() ); }