Skip to content

Commit 17fc841

Browse files
committed
now when import user in yaf the last login date is used for joined and lastvisit
1 parent 8b35867 commit 17fc841

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

yaf_dnn/Components/Utils/UserImporter.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright (C) 2006-2013 Jaben Cargman
44
* Copyright (C) 2014-2016 Ingo Herbote
55
* http://www.yetanotherforum.net/
6-
*
6+
*
77
* Licensed to the Apache Software Foundation (ASF) under one
88
* or more contributor license agreements. See the NOTICE file
99
* distributed with this work for additional information
@@ -112,7 +112,7 @@ public static int ImportUsers(int boardId, int portalId, Guid portalGUID, out s
112112
{
113113
dnnUser.IsApproved = true;
114114
Membership.UpdateUser(dnnUser);
115-
}
115+
}
116116

117117
var yafUserId = LegacyDb.user_get(boardId, dnnUser.ProviderUserKey);
118118

@@ -219,7 +219,7 @@ public static int CreateYafUser(
219219
if (dnnUserInfo.Profile.Website.IsSet())
220220
{
221221
userProfile.Homepage = dnnUserInfo.Profile.Website;
222-
}
222+
}
223223

224224
userProfile.Save();
225225

@@ -241,7 +241,8 @@ public static int CreateYafUser(
241241
null,
242242
null,
243243
null,
244-
null);
244+
null,
245+
dnnUserInfo.Membership.LastLoginDate.ToUniversalTime());
245246

246247
var autoWatchTopicsEnabled =
247248
boardSettings.DefaultNotificationSetting.Equals(UserNotificationSetting.TopicsIPostToOrSubscribeTo);

0 commit comments

Comments
 (0)