mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
message MDL-25264 made it possible to edit another user's message preferences
This commit is contained in:
parent
861fa9120d
commit
fa8f03efbb
2 changed files with 11 additions and 4 deletions
|
@ -67,7 +67,13 @@ class message_output_email extends message_output {
|
|||
global $USER;
|
||||
$string = get_string('email','message_email').': <input size="30" name="email_email" value="'.$preferences->email_email.'" />';
|
||||
if (empty($preferences->email_email)) {
|
||||
$string .= ' ('.get_string('default').': '.$USER->email.')';
|
||||
$userdefaultemail = null;
|
||||
if (empty($preferences->userdefaultemail)) {
|
||||
$userdefaultemail = $USER->email;
|
||||
} else {
|
||||
$userdefaultemail = $preferences->userdefaultemail;
|
||||
}
|
||||
$string .= ' ('.get_string('default').': '.$userdefaultemail.')';
|
||||
}
|
||||
return $string;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue