]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-8973 : Undo API change in previous commit
authordonal72 <donal72>
Mon, 30 Apr 2007 03:14:43 +0000 (03:14 +0000)
committerdonal72 <donal72>
Mon, 30 Apr 2007 03:14:43 +0000 (03:14 +0000)
lib/moodlelib.php

index 4121c1de17494916ab2cfc84b959691472a52fc7..42ee75403b3201ff35a73cbf59ee04bf1ad8a773 100644 (file)
@@ -1828,11 +1828,11 @@ function require_logout() {
     if (isloggedin()) {
         add_to_log(SITEID, "user", "logout", "view.php?id=$USER->id&course=".SITEID, $USER->id, 0, $USER->id);
 
-        if (!isset($USER->auth) || empty($USER->auth)) {
-            $USER->auth = get_field('user', 'auth', 'id', $USER->id);
+        $authsequence = get_enabled_auth_plugins(); // auths, in sequence
+        foreach($authsequence as $authname) {
+            $authplugin = get_auth_plugin($authname);
+            $authplugin->prelogout_hook();
         }
-        $authplugin = get_auth_plugin($USER->auth);
-        $authplugin->prelogout_hook();
     }
 
     if (ini_get_bool("register_globals") and check_php_version("4.3.0")) {