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

prelogout_hook() is never executed in login/logout.php

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8
    • Fix Version/s: 1.8
    • Component/s: Authentication
    • Labels:
      None
    • Affected Branches:
      MOODLE_18_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE

      Description

      lib/authlib.php defines both prelogin_hook() and prelogout_hook(). It seems there is a bug in login/logout.php as it runs prelogin_hook() instead of prelogout_hook() for each of the enabled authentication plugins.

      In addition to that, the hooks are run even if the user chooses not to logout, because the hooks are run before the notice_yesno() call to confirm the logout. So we need to move the hook calls after the logout confirmation check.

      The attached patch solves both issues.

      Saludos. Iñaki.

        Attachments

          Activity

            People

            • Assignee:
              skodak Petr Skoda
              Reporter:
              iarenaza Iñaki Arenaza
              Tester:
              Nobody
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                31/Mar/07