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

Notice during invalid login token validation for unknown user

XMLWordPrintable

    • MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
    • MOODLE_37_STABLE, MOODLE_38_STABLE
    • Hide
      1. Login as admin
      2. Navigate to Development > Debugging in Site administration
      3. Set Debug messages to Developer, and Display debug messages to Yes
      4. Save changes
      5. Log out
      6. Visit login page
      7. Clear session cookie *
      8. Attempt to login with a non-existing account
      9. Confirm you don't see a PHP notice
      10. Confirm the login form reloads with a warning stating "Invalid login, please try again"

      * We need to delete the MoodleSession cookie, which also simulates a session timing out - you can use your browser developer tools to inspect, then go to Application / Storage / Cookies and delete the cookie:

      Show
      Login as admin Navigate to Development > Debugging in Site administration Set Debug messages to Developer , and Display debug messages to Yes Save changes Log out Visit login page Clear session cookie * Attempt to login with a non-existing account Confirm you don't see a PHP notice Confirm the login form reloads with a warning stating "Invalid login, please try again" * We need to delete the MoodleSession cookie, which also simulates a session timing out - you can use your browser developer tools to inspect, then go to Application / Storage / Cookies and delete the cookie:

      The following notice is triggered after a failed validation of user login token, where the user account doesn't exist:

      Notice: Trying to get property 'id' of non-object in /var/www/html/lib/moodlelib.php on line 4427

      Because the $user object isn't guaranteed to exist here

            pholden Paul Holden
            pholden Paul Holden
            Peter Dias Peter Dias
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Janelle Barcega Janelle Barcega
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 47 minutes
                47m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.