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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.8
    • 1.8
    • Authentication
    • None
    • MOODLE_18_STABLE
    • 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

            skodak Petr Skoda
            iarenaza Iñaki Arenaza
            Nobody Nobody
            Jake Dallimore, Mathew May, Mihail Geshoski
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              31/Mar/07