class UserNotLoggedIn extends ErrorPageError {
/**
- * @note The value of the $reasonMsg parameter must be put into LoginForm::validErrorMessages or
- * set with the LoginFormValidErrorMessages Hook.
- * if you want the user to be automatically redirected to the login form.
+ * @note The value of the $reasonMsg parameter must be set with the LoginFormValidErrorMessages
+ * hook if you want the user to be automatically redirected to the login form.
*
* @param string $reasonMsg A message key containing the reason for the error.
* Optional, default: 'exception-nologin-text'
// since the message may not be compatible.
if ( !in_array( $this->msg, LoginHelper::getValidErrorMessages() ) ) {
parent::report();
+ return;
}
- // Message is valid. Redirec to Special:Userlogin
+ // Message is valid. Redirect to Special:Userlogin
$context = RequestContext::getMain();