Skip to content

Commit

Permalink
Anonymous login requires account to be set
Browse files Browse the repository at this point in the history
To enable anonymous login, we need both allow_anonymous_login and the
anonymous_account to be set.

The former without the latter results in a MantisBT generic error when
trying to login anonymously, as login.php is called with an empty
username.

Fixes #25061
  • Loading branch information
dregad committed Dec 23, 2018
1 parent e16586b commit 91782fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/authentication_api.php
Expand Up @@ -176,7 +176,7 @@ function auth_signup_access_level() {
* @return bool true: enabled; false: otherwise.
*/
function auth_anonymous_enabled() {
return config_get_global( 'allow_anonymous_login' );
return config_get_global( 'allow_anonymous_login' ) && auth_anonymous_account();
}

/**
Expand Down

0 comments on commit 91782fe

Please sign in to comment.