message MDL-25264 removed another reference to $USER

This commit is contained in:
Andrew Davis
2010-11-18 07:05:47 +00:00
parent 9ecf4f44e4
commit 0d447fe634
@@ -66,14 +66,9 @@ class message_output_email extends message_output {
function config_form($preferences){
global $USER;
$string = get_string('email','message_email').': <input size="30" name="email_email" value="'.$preferences->email_email.'" />';
if (empty($preferences->email_email)) {
$userdefaultemail = null;
if (empty($preferences->userdefaultemail)) {
$userdefaultemail = $USER->email;
} else {
$userdefaultemail = $preferences->userdefaultemail;
}
$string .= ' ('.get_string('default').': '.$userdefaultemail.')';
if (empty($preferences->email_email) && !empty($preferences->userdefaultemail)) {
$string .= ' ('.get_string('default').': '.$preferences->userdefaultemail.')';
}
return $string;
}