]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-9028 prelogout_hook() is never executed in login/logout.php; patch by Inaki Arena...
authorskodak <skodak>
Sun, 25 Mar 2007 20:20:45 +0000 (20:20 +0000)
committerskodak <skodak>
Sun, 25 Mar 2007 20:20:45 +0000 (20:20 +0000)
login/logout.php

index 41c3039abad6a41237851d15aa00406f57817d7a..4b7abf69d518f3f42536fee3e014d9d4242b8fee 100644 (file)
@@ -6,12 +6,6 @@
     // can be overriden by auth plugins
     $redirect = $CFG->wwwroot.'/';
 
-    $authsequence = explode(',', $CFG->auth); // auths, in sequence
-    foreach($authsequence as $authname) {
-        $authplugin = get_auth_plugin($authname);
-        $authplugin->prelogin_hook();
-    }
-
     $sesskey = optional_param('sesskey', '__notpresent__', PARAM_RAW); // we want not null default to prevent required sesskey warning
 
     if (!confirm_sesskey($sesskey)) {
         die;
     }
 
+    $authsequence = explode(',', $CFG->auth); // auths, in sequence
+    foreach($authsequence as $authname) {
+        $authplugin = get_auth_plugin($authname);
+        $authplugin->prelogout_hook();
+    }
+
     require_logout();
 
     redirect($redirect);