Fixed possible issue in UserStorageHandler::update()
authorMagnus Kühn <magnus.khn@gmail.com>
Sun, 22 Dec 2013 14:19:46 +0000 (15:19 +0100)
committerMagnus Kühn <magnus.khn@gmail.com>
Sun, 22 Dec 2013 14:19:46 +0000 (15:19 +0100)
wcfsetup/install/files/lib/system/user/storage/UserStorageHandler.class.php

index 6b5f2de5c7e506a7c9c57d84d1181585ba405570..9f0c64b5216fbf0532136d3aa0fd85943e5cc4ef 100644 (file)
@@ -97,11 +97,9 @@ class UserStorageHandler extends SingletonFactory {
                $this->updateFields[$userID][$field] = $fieldValue;
                
                // update data cache for given user
-               if (!isset($this->cache[$userID])) {
-                       $this->cache[$userID] = array();
+               if (isset($this->cache[$userID])) {
+                       $this->cache[$userID][$field] = $fieldValue;
                }
-               
-               $this->cache[$userID][$field] = $fieldValue;
        }
        
        /**