Skip to content

Commit

Permalink
message MDL-25264 removed another reference to $USER
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Davis committed Nov 18, 2010
1 parent 9ecf4f4 commit 0d447fe
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions message/output/email/message_output_email.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,9 @@ function send_message($eventdata) {
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;
}
Expand Down

0 comments on commit 0d447fe

Please sign in to comment.