use wcf\data\user\avatar\UserAvatar;
use wcf\data\user\avatar\UserAvatarEditor;
use wcf\data\user\avatar\UserAvatarList;
+use wcf\data\user\cover\photo\DefaultUserCoverPhoto;
use wcf\data\user\cover\photo\IWebpUserCoverPhoto;
use wcf\data\user\User;
use wcf\data\user\UserEditor;
foreach ($userProfiles as $userProfile) {
$editor = new UserEditor($userProfile->getDecoratedObject());
$coverPhoto = $userProfile->getCoverPhoto(true);
+ if ($coverPhoto instanceof DefaultUserCoverPhoto) {
+ // The default cover photo can be returned if the user has a
+ // cover photo, but it has been disabled by an administrator.
+ continue;
+ }
// If neither the regular, nor the WebP variant is readable then the
// cover photo is missing and we must clear the database information.