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

The user_login_failed event "reason" is ambiguous

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.7.10, 3.2.5, 3.3, 3.4
    • Fix Version/s: 3.2.6, 3.3.3
    • Component/s: Logging
    • Labels:
    • Testing Instructions:
      Hide
      1. Generate bad login attempts by entering wrong password/username
      2. Login as admin
      3. go to Site administration->Reports->Logs
      4. Change "All activities" to "Site errors" and click on "Get these logs"
      5. Failed logins should have meaningful  description, not only error ID
      Show
      Generate bad login attempts by entering wrong password/username Login as admin go to Site administration->Reports->Logs Change "All activities" to "Site errors" and click on "Get these logs" Failed logins should have meaningful  description, not only error ID
    • Affected Branches:
      MOODLE_27_STABLE, MOODLE_32_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE, MOODLE_33_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      master-MDL-51892

      Description

      When reviewing the site logs, the description for the "User login failed" event is "Login failed for the username 'bob' for the reason with id '3'."

      "Reason id '3'" doesn't mean anything to an administrator viewing the logs. To find out what '3' refers to requires looking at lib/authlib.php and deciphering the constants.

      The event description should instead show a proper description of the error, eg "Login failed for the username 'bob' with status:

      {user doesn't exist | user is suspended | ...}

      " etc

      Component report 2015-10-23 11-47-12.png

      /report/log/user.php?id=123&course=1&mode=all

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                5 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  13/Nov/17