Skip to content

Commit

Permalink
Make $g_anonymous_account not case sensitive
Browse files Browse the repository at this point in the history
If the case of this config option and the username mismatched,
the anonymous access worked, but the login button didn’t causing
normal users to not be able to login or signup.

Fixes #22928
  • Loading branch information
vboctor committed May 28, 2017
1 parent 6b60e57 commit 9edd9b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/user_api.php
Expand Up @@ -468,7 +468,7 @@ function user_is_protected( $p_user_id ) {
* @access public
*/
function user_is_anonymous( $p_user_id ) {
return auth_anonymous_enabled() && user_get_field( $p_user_id, 'username' ) == auth_anonymous_account();
return auth_anonymous_enabled() && strcasecmp( user_get_field( $p_user_id, 'username' ), auth_anonymous_account() ) == 0;
}

/**
Expand Down

0 comments on commit 9edd9b1

Please sign in to comment.