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

Reimplement access to log table in functions notify_login_failures() and count_login_failures()

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Enable standard logstore plugin for both tests below.

      Test 1

      1. set config 'notifyloginthreshold' to 1
      2. set config 'notifyloginfailures' to a user which can receive emails
      3. Login to site incorrectly 2 times using :-
        1. a valid username
        2. an invalid username
        3. a invalid username from a different ip, beside your own
      4. Login correctly to the site twice.
      5. Run cron, make sure an email is sent to the user selected in notifyloginthreshold, with a report that gives details about each incorrect login information with time, ip and username.
      6. Make sure the link to log reports in the email works.

      Test 2

      1. Before applying the patch, set displayloginfailures config to something beside "nobody".
      2. Apply the patch, and upgrade.
      3. Make sure now displayloginfailures is a checkbox and not a select and is checked.
      4. Do incorrect logins with valid username.
      5. Login as that user, and make sure you get a message, just below the logging box saying "x failed logins since your last login"

      Test 3
      Run unit tests under user/tests/userlib_test.php

      Show
      Enable standard logstore plugin for both tests below. Test 1 set config 'notifyloginthreshold' to 1 set config 'notifyloginfailures' to a user which can receive emails Login to site incorrectly 2 times using :- a valid username an invalid username a invalid username from a different ip, beside your own Login correctly to the site twice. Run cron, make sure an email is sent to the user selected in notifyloginthreshold, with a report that gives details about each incorrect login information with time, ip and username. Make sure the link to log reports in the email works. Test 2 Before applying the patch, set displayloginfailures config to something beside "nobody". Apply the patch, and upgrade. Make sure now displayloginfailures is a checkbox and not a select and is checked. Do incorrect logins with valid username. Login as that user, and make sure you get a message, just below the logging box saying "x failed logins since your last login" Test 3 Run unit tests under user/tests/userlib_test.php
    • Affected Branches:
      MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE
    • Epic Link:
    • Pull Master Branch:
      MDL-42891-master
    • Story Points:
      20
    • Sprint:
      BACKEND Sprint 11

      Description

      Currently these functions uses the legacy logging table. It needs to be upgraded to use the new logging API.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  12/May/14