diff --git a/user/profile/lib.php b/user/profile/lib.php index e9eab61bf00..8a0820e261b 100644 --- a/user/profile/lib.php +++ b/user/profile/lib.php @@ -236,7 +236,11 @@ class profile_field_base { case PROFILE_VISIBLE_ALL: return true; case PROFILE_VISIBLE_PRIVATE: - return ($this->userid == $USER->id); + if ($this->userid == $USER->id) { + return true; + } else { + return has_capability('moodle/user:update', get_context_instance(CONTEXT_SYSTEM)); + } default: return has_capability('moodle/user:update', get_context_instance(CONTEXT_SYSTEM)); }