$data['data']['disableCoverPhoto'] = $this->disableCoverPhoto;
$data['data']['disableCoverPhotoReason'] = $this->disableCoverPhotoReason;
$data['data']['disableCoverPhotoExpires'] = $this->disableCoverPhotoExpires;
-
- if ($this->deleteCoverPhoto) {
- UserProfileRuntimeCache::getInstance()->getObject($this->userID)->getCoverPhoto()->delete();
-
- $data['data']['coverPhotoHash'] = null;
- $data['data']['coverPhotoExtension'] = '';
-
- UserProfileRuntimeCache::getInstance()->removeObject($this->userID);
- }
}
$this->objectAction = new UserAction([$this->userID], 'update', $data);
* @property-read string $authData data of the third party used for authentication
* @property-read int $likesReceived cumulative result of likes (counting +1) the user's contents have received
* @property-read int|null $coverPhotoFileID
- * @property-read string $coverPhotoHash hash of the user's cover photo
- * @property-read string $coverPhotoExtension extension of the user's cover photo file
- * @property-read int $coverPhotoHasWebP is `1` if a webp variant of the cover photo and its thumbnail exists, otherwise `0`
* @property-read int $disableCoverPhoto is `1` if the user's cover photo has been disabled, otherwise `0`
* @property-read string $disableCoverPhotoReason reason why the user's cover photo is disabled
* @property-read int $disableCoverPhotoExpires timestamp at which the user's cover photo will automatically be enabled again
switch ($conditionData['userCoverPhoto']) {
case self::NO_COVER_PHOTO:
$objectList->getConditionBuilder()->add(
- '(user_table.coverPhotoHash = ? OR user_table.coverPhotoHash IS NULL)',
- ['']
+ '(user_table.coverPhotoFileID IS NULL)',
);
break;
case self::COVER_PHOTO:
$objectList->getConditionBuilder()->add(
- '(user_table.coverPhotoHash <> ? AND user_table.coverPhotoHash IS NOT NULL)',
- ['']
+ '(user_table.coverPhotoFileID IS NOT NULL)',
);
break;
}
{
switch ($condition->userCoverPhoto) {
case self::NO_COVER_PHOTO:
- return $user->coverPhotoExtension === '' || $user->coverPhotoExtension === null;
+ return $user->coverPhotoFileID === null;
break;
case self::COVER_PHOTO:
- return $user->coverPhotoExtension !== '' && $user->coverPhotoExtension !== null;
+ return $user->coverPhotoFileID !== null;
break;
}
}
<item name="wcf.user.coverPhoto.delete"><![CDATA[Titelbild löschen]]></item>
<item name="wcf.user.coverPhoto.delete.confirmMessage"><![CDATA[{if LANGUAGE_USE_INFORMAL_VARIANT}Willst du dein{else}Wollen Sie Ihr{/if} Titelbild wirklich löschen? Nach dem Löschen wird wieder das Standard-Bild angezeigt.]]></item>
<item name="wcf.user.coverPhoto.edit"><![CDATA[Titelbild bearbeiten]]></item>
- <item name="wcf.user.coverPhoto.error.disabled"><![CDATA[Der Administrator hat{if $__wcf->user->coverPhotoHash} {if LANGUAGE_USE_INFORMAL_VARIANT}dein{else}Ihr{/if} derzeitiges Titelbild gesperrt und{/if} {if LANGUAGE_USE_INFORMAL_VARIANT}dir{else}Ihnen{/if} die weitere Nutzungsberechtigung der Titelbild-Funktion {if !$__wcf->user->disableCoverPhotoReason}entzogen.{else} aus folgenden Gründen entzogen: {$__wcf->user->disableCoverPhotoReason}{/if}]]></item>
+ <item name="wcf.user.coverPhoto.error.disabled"><![CDATA[Der Administrator hat{if $__wcf->user->coverPhotoFileID} {if LANGUAGE_USE_INFORMAL_VARIANT}dein{else}Ihr{/if} derzeitiges Titelbild gesperrt und{/if} {if LANGUAGE_USE_INFORMAL_VARIANT}dir{else}Ihnen{/if} die weitere Nutzungsberechtigung der Titelbild-Funktion {if !$__wcf->user->disableCoverPhotoReason}entzogen.{else} aus folgenden Gründen entzogen: {$__wcf->user->disableCoverPhotoReason}{/if}]]></item>
<item name="wcf.user.coverPhoto.noImage"><![CDATA[Der Benutzer hat noch kein Titelbild hochgeladen.]]></item>
<item name="wcf.user.coverPhoto.upload"><![CDATA[Titelbild hochladen]]></item>
<item name="wcf.user.coverPhoto.upload.description"><![CDATA[Minimale Bildgröße: {$coverPhotoDimensions.min.width} × {$coverPhotoDimensions.min.height} Pixel<br>Maximale Bildgröße: {$coverPhotoDimensions.max.width} × {$coverPhotoDimensions.max.height} Pixel<br>Erlaubte Dateiendungen: gif, jpg, jpeg, png, webp<br>Maximale Dateigröße: {$__wcf->session->getPermission('user.profile.coverPhoto.maxSize')|filesize}]]></item>
<item name="wcf.user.coverPhoto.delete"><![CDATA[Delete Cover Photo]]></item>
<item name="wcf.user.coverPhoto.delete.confirmMessage"><![CDATA[Do you really want to delete your cover photo? This will replace your current photo with the default image.]]></item>
<item name="wcf.user.coverPhoto.edit"><![CDATA[Edit Cover Photo]]></item>
- <item name="wcf.user.coverPhoto.error.disabled"><![CDATA[The administrators {if $__wcf->user->coverPhotoHash}have blocked your cover photo and {/if}disallowed you from using a cover photo{if $__wcf->user->disableCoverPhotoReason}: {$__wcf->user->disableCoverPhotoReason}{/if}.]]></item>
+ <item name="wcf.user.coverPhoto.error.disabled"><![CDATA[The administrators {if $__wcf->user->coverPhotoFileID}have blocked your cover photo and {/if}disallowed you from using a cover photo{if $__wcf->user->disableCoverPhotoReason}: {$__wcf->user->disableCoverPhotoReason}{/if}.]]></item>
<item name="wcf.user.coverPhoto.noImage"><![CDATA[The user has not yet uploaded a cover photo.]]></item>
<item name="wcf.user.coverPhoto.upload"><![CDATA[Upload Cover Photo]]></item>
<item name="wcf.user.coverPhoto.upload.description"><![CDATA[Minimum Image Size: {$coverPhotoDimensions.min.width} × {$coverPhotoDimensions.min.height} pixels<br>Maximum Image Size: {$coverPhotoDimensions.max.width} × {$coverPhotoDimensions.max.height} pixels<br>Allowed File Extensions: gif, jpg, jpeg, png, webp<br>Maximum Filesize: {$__wcf->session->getPermission('user.profile.coverPhoto.maxSize')|filesize}]]></item>