Skip to content

Commit 845777a

Browse files
committed
ignore default no_avatar.gif avatar from dnn
1 parent 2c6e021 commit 845777a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

yaf_dnn/Components/Utils/ProfileSyncronizer.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,13 @@ private static void SyncYafProfile(int yafUserId, YafUserProfile yafUserProfile,
236236

237237
yafUserProfile.Save();
238238

239-
if (dnnUserInfo.Profile.Photo.IsSet())
239+
if (dnnUserInfo.Profile.Photo.IsSet() && !dnnUserInfo.Profile.PhotoURL.Contains("no_avatar.gif"))
240240
{
241-
SaveDnnAvatar(dnnUserInfo.Profile.Photo, yafUserId, portalGUID, boardSettings);
241+
SaveDnnAvatar(dnnUserInfo.Profile.PhotoURL, yafUserId, portalGUID, boardSettings);
242+
}
243+
else
244+
{
245+
LegacyDb.user_deleteavatar(yafUserId);
242246
}
243247

244248
// clear the cache for this user...)

0 commit comments

Comments
 (0)