Skip to content
Snippets Groups Projects
Commit 2da0d41a authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

#123577 by spatz4000 (originally by tostinni for Drupal 5): do not allow...

#123577 by spatz4000 (originally by tostinni for Drupal 5): do not allow hidden profile fields to be browsed by non-admins
parent 39e9548f
No related branches found
No related tags found
No related merge requests found
......@@ -462,8 +462,8 @@ function profile_browse() {
drupal_not_found();
return;
}
// Do not allow browsing of private fields by non-admins.
if (!user_access('administer users') && $field->visibility == PROFILE_PRIVATE) {
// Do not allow browsing of private and hidden fields by non-admins.
if (!user_access('administer users') && ($field->visibility == PROFILE_PRIVATE || $field->visibility == PROFILE_HIDDEN)) {
drupal_access_denied();
return;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment