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

$CFG->displayloginfailures not rendering notice in page footer

    XMLWordPrintable

Details

    • MOODLE_31_STABLE
    • MOODLE_31_STABLE, MOODLE_32_STABLE
    • MDL-57182-master
    • Hide

      For master, please test on boost AND clean

      1. Add $CFG->displayloginfailures = true; to your config.php.
      2. Hit the login page
      3. Enter the admin username, but provide an incorrect password and try to log in.
      4. Now, enter the correct password and log in
      5. Confirm that:
        • You see a string - "1 failed logins since your last login" - in the page header/nav, underneath the username. N.b. when testing master+boost, this string may be badly formatted - MDL-56955 addresses this.
        • You see a string in the page footer - "1 failed logins since your last login (Logs)"
        • You can click the 'Logs' link and are taken to login records.
      6. Click any link and confirm that after redirection, the notices in the header and footer are gone.
      Show
      For master, please test on boost AND clean Add $CFG->displayloginfailures = true; to your config.php. Hit the login page Enter the admin username, but provide an incorrect password and try to log in. Now, enter the correct password and log in Confirm that : You see a string - "1 failed logins since your last login" - in the page header/nav, underneath the username. N.b. when testing master+boost, this string may be badly formatted - MDL-56955 addresses this. You see a string in the page footer - "1 failed logins since your last login (Logs)" You can click the 'Logs' link and are taken to login records. Click any link and confirm that after redirection, the notices in the header and footer are gone.

    Description

      I noticed this when reviewing MDL-56955. When $CFG->displayloginfailures is set to true (in config.php), there should be a notice in both the header (nav) and the footer. It seems MDL-45893 introduced a regression in this setting, by making 2 calls to user_count_login_failures with the reset flag set to default=true. The first call (header/nav) works fine, however, the second (which dictates the rendering of the footer notice) returns 0, meaning the notice never gets shown.

      Attachments

        Issue Links

          Activity

            People

              jaked Jake Dallimore
              jaked Jake Dallimore
              Jun Pataleta Jun Pataleta
              Dan Poltawski Dan Poltawski
              Rajesh Taneja Rajesh Taneja
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Huong Nguyen, Bas Brands, Mathew May
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                9/Jan/17