use ParagonIE\ConstantTime\Hex;
use wcf\data\AbstractDatabaseObjectAction;
+use wcf\data\file\FileAction;
use wcf\data\IClipboardAction;
use wcf\data\ISearchAction;
use wcf\data\object\type\ObjectTypeCache;
}
// delete avatars
- $avatarIDs = [];
+ $avatarIDs = $avatarFileIDs = [];
foreach ($this->getObjects() as $user) {
if ($user->avatarID) {
$avatarIDs[] = $user->avatarID;
}
+ if ($user->avatarFileID !== null) {
+ $avatarFileIDs[] = $user->avatarFileID;
+ }
}
if (!empty($avatarIDs)) {
$action = new UserAvatarAction($avatarIDs, 'delete');
$action->executeAction();
}
+ if (!empty($avatarFileIDs)) {
+ (new FileAction($avatarFileIDs, 'delete'))->executeAction();
+ }
// delete profile comments and signature attachments
if (!empty($this->objectIDs)) {