From 780dd11cfb872f9f49ab9acbcb1adc82c731695b Mon Sep 17 00:00:00 2001 From: moodler Date: Tue, 3 Aug 2004 06:53:04 +0000 Subject: [PATCH] Single more concise string for login error notification emails --- lang/en/moodle.php | 3 +-- lib/moodlelib.php | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lang/en/moodle.php b/lang/en/moodle.php index f3fb09c5f7..19c4d49bc4 100644 --- a/lang/en/moodle.php +++ b/lang/en/moodle.php @@ -716,8 +716,7 @@ $string['notenrolled'] = '$a is not enrolled in this course.'; $string['noteuserschangednonetocourse'] = 'Note: course users need to be restored when restoring user data. This setting has been changed for you.'; $string['notifyloginfailuressubject'] = '$a :: Failed logins notification'; $string['notifyloginfailuresmessagestart'] = 'Here is a list of failed login attempts at $a since you were last notified '; -$string['notifyloginfailuresmessagefromip'] = ' from IP address '; -$string['notifyloginfailuresmessagewithuser'] = ' with username '; +$string['notifyloginfailuresmessage'] = '$a->time, IP: $a->ip, User: $a->info'; $string['notifyloginfailuresmessageend'] = 'You can view these logs at $a/course/log.php?id=1&chooselog=1&modid=site_errors.'; $string['numattempts'] = '$a failed login attempt(s) '; $string['nothingnew'] = 'Nothing new since your last login'; diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 0775a70746..270aceffdb 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -2550,8 +2550,8 @@ function notify_login_failures() { $message .= get_string('notifyloginfailuresmessagestart','',$CFG->wwwroot) .(($CFG->lastnotifyfailure != 0) ? '('.userdate($CFG->lastnotifyfailure).')' : '')."\n\n"; foreach ($logs as $log) { - $message .= userdate($log->time) .get_string('notifyloginfailuresmessagefromip').$log->ip - .get_string('notifyloginfailuresmessagewithuser').$log->info."\n"; + $log->time = userdate($log->time); + $message .= get_string('notifyloginfailuresmessage','',$log)."\n"; } $message .= "\n\n".get_string('notifyloginfailuresmessageend','',$CFG->wwwroot)."\n\n"; foreach ($recip as $admin) { -- 2.39.5