Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-32985

notify_login_failures executed even when no recipients

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.6, 2.2.3, 2.3
    • Fix Version/s: 2.1.7, 2.2.4
    • Component/s: Administration
    • Labels:
    • Testing Instructions:
      Hide
      • Note: this requires, for sure testing under 21_STABLE. Patch is different.
      1. Login as admin
      2. Set notifyloginfailures to nobody
      3. Run cron and make sure 'Notified login failures' should not appear in cron log
      4. Set notifyloginfailures to "Admin User"
      5. Run cron and 'Notified login failures' should appear in cron log
      6. Set notifyloginfailures to "Admin User"
      7. Run cron and make sure 'Notified login failures' should not appear in cron log
      8. Run cron after 1 hour and 'Notified login failures' should appear in cron log
      Show
      Note: this requires, for sure testing under 21_STABLE. Patch is different. Login as admin Set notifyloginfailures to nobody Run cron and make sure 'Notified login failures' should not appear in cron log Set notifyloginfailures to "Admin User" Run cron and 'Notified login failures' should appear in cron log Set notifyloginfailures to "Admin User" Run cron and make sure 'Notified login failures' should not appear in cron log Run cron after 1 hour and 'Notified login failures' should appear in cron log
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull Master Branch:

      Description

      cron_run() just checks for $CFG->notifyloginfailures empty, but it is set to '$@NONE@$', so notify_login_failures() is triggered every time, even when no notifications are sent.

      If you look in notify_login_failures(), in this case (it is called, but there are no recipients) all the work is done (which on our system is very very non-trivial), but absolutely no updates/changes/anything are done

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  9/Jul/12