Fix typo in avatar condition in UserRebuildDataWorker
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / lib / system / worker / UserRebuildDataWorker.class.php
index 0ad874e5a8f81a007ed03177bcc3ff81c738181e..f55276b0ce9b403cdbd3332cb16de09e075e5acb 100644 (file)
@@ -47,7 +47,9 @@ class UserRebuildDataWorker extends AbstractRebuildDataWorker
         parent::initObjectList();
 
         $this->objectList->sqlSelects = 'user_option_value.userOption' . User::getUserOptionID('aboutMe') . ' AS aboutMe';
-        $this->objectList->sqlJoins = "LEFT JOIN wcf" . WCF_N . "_user_option_value user_option_value ON (user_option_value.userID = user_table.userID)";
+        $this->objectList->sqlJoins = "
+            LEFT JOIN   wcf" . WCF_N . "_user_option_value user_option_value
+            ON          user_option_value.userID = user_table.userID";
         $this->objectList->sqlOrderBy = 'user_table.userID';
     }
 
@@ -114,9 +116,9 @@ class UserRebuildDataWorker extends AbstractRebuildDataWorker
                                     SELECT      COUNT(*)
                                     FROM        wcf" . WCF_N . "_user_trophy user_trophy
                                     LEFT JOIN   wcf" . WCF_N . "_trophy trophy
-                                    ON          (user_trophy.trophyID = trophy.trophyID)
+                                    ON          user_trophy.trophyID = trophy.trophyID
                                     LEFT JOIN   wcf" . WCF_N . "_category trophy_category
-                                    ON          (trophy.categoryID = trophy_category.categoryID)
+                                    ON          trophy.categoryID = trophy_category.categoryID
                                     WHERE           user_trophy.userID = user_table.userID
                                                 AND trophy.isDisabled = 0
                                                 AND trophy_category.isDisabled = 0
@@ -218,7 +220,7 @@ class UserRebuildDataWorker extends AbstractRebuildDataWorker
                 [
                     UserAvatar::AVATAR_SIZE,
                     UserAvatar::AVATAR_SIZE,
-                    1,
+                    0,
                     "gif",
                 ]
             );
@@ -269,6 +271,7 @@ class UserRebuildDataWorker extends AbstractRebuildDataWorker
                     $width = $height = UserAvatar::AVATAR_SIZE;
                 }
 
+                $editor->deleteLegacyThumbnails();
                 $editor->createAvatarVariant();
 
                 $editor->update([