Use `avatarFileID` instead of `avatarID
authorCyperghost <olaf_schmitz_1@t-online.de>
Fri, 8 Nov 2024 11:48:58 +0000 (12:48 +0100)
committerCyperghost <olaf_schmitz_1@t-online.de>
Fri, 8 Nov 2024 11:48:58 +0000 (12:48 +0100)
wcfsetup/install/files/lib/system/condition/UserAvatarCondition.class.php

index 07e584e9606325077ba4f03bc8f4a8c31fcbf429..5e386fe1083e33c5501e1b74c871db0ba9220489 100644 (file)
@@ -61,11 +61,11 @@ class UserAvatarCondition extends AbstractSelectCondition implements
 
         switch ($conditionData['userAvatar']) {
             case self::NO_AVATAR:
-                $objectList->getConditionBuilder()->add('user_table.avatarID IS NULL');
+                $objectList->getConditionBuilder()->add('user_table.avatarFileID IS NULL');
                 break;
 
             case self::AVATAR:
-                $objectList->getConditionBuilder()->add('user_table.avatarID IS NOT NULL');
+                $objectList->getConditionBuilder()->add('user_table.avatarFileID IS NOT NULL');
                 break;
 
             case self::GRAVATAR:
@@ -81,10 +81,10 @@ class UserAvatarCondition extends AbstractSelectCondition implements
     {
         switch ($condition->userAvatar) {
             case self::NO_AVATAR:
-                return !$user->avatarID;
+                return !$user->avatarFileID;
 
             case self::AVATAR:
-                return $user->avatarID != 0;
+                return $user->avatarFileID !== null;
 
             case self::GRAVATAR:
                 return false;