User preferences were not getting set!
authormoodler <moodler>
Sun, 23 Jan 2005 02:30:15 +0000 (02:30 +0000)
committermoodler <moodler>
Sun, 23 Jan 2005 02:30:15 +0000 (02:30 +0000)
lib/moodlelib.php

index 9a7b27a..675e2c0 100644 (file)
@@ -421,11 +421,10 @@ function set_user_preferences($prefarray, $userid=NULL) {
     }
 
     if (empty($userid)){
-        if(!empty($USER) && !empty($USER->id)) {
-            $userid = $USER->id;
-        }
-        else {
-            return false;
+        if (!empty($USER) && !empty($USER->id)) {
+            $userid = NULL;  // Continue with the current user below
+        } else {
+            return false;    // No-one to set!
         }
     }