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

$CFG->displayloginfailures not rendering notice in page footer

    XMLWordPrintable

    Details

    • Testing Instructions:
      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.
    • Affected Branches:
      MOODLE_31_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE, MOODLE_32_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-57182-master

      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

              • Assignee:
                jaked Jake Dallimore
                Reporter:
                jaked Jake Dallimore
                Peer reviewer:
                Jun Pataleta
                Integrator:
                Dan Poltawski
                Tester:
                Rajesh Taneja
                Participants:
                Component watchers:
                Jake Dallimore, Jun Pataleta, Ryan Wyllie, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  9/Jan/17