Skip to content

Commit

Permalink
Fix #10889: user_is_protected() incorrect logic for anon accounts
Browse files Browse the repository at this point in the history
Commit 3803c90 introduced a bug whereby
the anonymous account would never be considered protected. This was due
to inversed/invalid logic. How embarrassing!
  • Loading branch information
davidhicks committed Aug 31, 2009
1 parent f4c02f6 commit 191b5c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/user_api.php
Expand Up @@ -357,7 +357,7 @@ function user_is_administrator( $p_user_id ) {
* @access public
*/
function user_is_protected( $p_user_id ) {
if( !user_is_anonymous( $p_user_id ) && ON == user_get_field( $p_user_id, 'protected' ) ) {
if( user_is_anonymous( $p_user_id ) || ON == user_get_field( $p_user_id, 'protected' ) ) {
return true;
}
return false;
Expand Down

0 comments on commit 191b5c9

Please sign in to comment.