Fixed multiple issues in UserAvatarAction::fetchRemoteAvatar()
authorMarcel Werk <burntime@woltlab.com>
Sat, 3 Jan 2015 23:45:20 +0000 (00:45 +0100)
committerMarcel Werk <burntime@woltlab.com>
Sat, 3 Jan 2015 23:45:20 +0000 (00:45 +0100)
wcfsetup/install/files/lib/data/user/avatar/UserAvatarAction.class.php

index 78b7ea1b8e3076a9737464dae23aa4ce23c86b24..dccea951ee7b9ea3b589aad6b7d12f7afb92f93d 100644 (file)
@@ -239,13 +239,13 @@ class UserAvatarAction extends AbstractDatabaseObjectAction {
                        
                        // delete old avatar
                        if ($this->parameters['userEditor']->avatarID) {
-                               $action = new UserAvatarAction(array(WCF::getUser()->avatarID), 'delete');
+                               $action = new UserAvatarAction(array($this->parameters['userEditor']->avatarID), 'delete');
                                $action->executeAction();
-                               
-                               // reset user storage
-                               UserStorageHandler::getInstance()->reset(array(WCF::getUser()->userID), 'avatar');
                        }
                }
+               
+               // reset user storage
+               UserStorageHandler::getInstance()->reset(array($this->parameters['userEditor']->userID), 'avatar');
        }
        
        /**