MDL-60548 profile: Show profile email when 'maildisplay' allows it.
Adds 'email' to hiddenuserfields, which allows: * user to view email on their own profile, * users with cap site:viewuseridentity to view email on any profile (admins/teachers) * admin to veto display of email to users without site:viewuseridentity (except viewing their own) * unprivileged users to view if the profile's maildisplay permits it. Changes in user/lib.php include removal of is_siteadmin() test, which is redundant due to checks via has_capability(). Fixes regression from 2.9 (MDL-45774).
This commit is contained in:
@@ -150,6 +150,7 @@ if ($hassiteconfig
|
||||
$temp->add(new admin_setting_configmultiselect('hiddenuserfields', new lang_string('hiddenuserfields', 'admin'),
|
||||
new lang_string('confighiddenuserfields', 'admin'), array(),
|
||||
array('description' => new lang_string('description'),
|
||||
'email' => new lang_string('email'),
|
||||
'city' => new lang_string('city'),
|
||||
'country' => new lang_string('country'),
|
||||
'timezone' => new lang_string('timezone'),
|
||||
|
||||
Reference in New Issue
Block a user