MDL-32985 cron: prevent notices on "new" sites.
This commit is contained in:
+4
-4
@@ -8145,6 +8145,10 @@ function notify_login_failures() {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (empty($CFG->lastnotifyfailure)) {
|
||||
$CFG->lastnotifyfailure=0;
|
||||
}
|
||||
|
||||
$recip = get_users_from_config($CFG->notifyloginfailures, 'moodle/site:config');
|
||||
|
||||
// If it has been less than an hour, or if there are no recipients, don't execute.
|
||||
@@ -8152,10 +8156,6 @@ function notify_login_failures() {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (empty($CFG->lastnotifyfailure)) {
|
||||
$CFG->lastnotifyfailure=0;
|
||||
}
|
||||
|
||||
// we need to deal with the threshold stuff first.
|
||||
if (empty($CFG->notifyloginthreshold)) {
|
||||
$CFG->notifyloginthreshold = 10; // default to something sensible.
|
||||
|
||||
Reference in New Issue
Block a user