|
|
|
|
@ -266,8 +266,8 @@ namespace Bit.Core.Utilities
@@ -266,8 +266,8 @@ namespace Bit.Core.Utilities
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Dates |
|
|
|
|
user.CreationDate = ParseDate(item.Properties, SettingsService.Instance.Sync.CreationDateAttribute); |
|
|
|
|
user.RevisionDate = ParseDate(item.Properties, SettingsService.Instance.Sync.RevisionDateAttribute); |
|
|
|
|
user.CreationDate = item.Properties.ParseDateTime(SettingsService.Instance.Sync.CreationDateAttribute); |
|
|
|
|
user.RevisionDate = item.Properties.ParseDateTime(SettingsService.Instance.Sync.RevisionDateAttribute); |
|
|
|
|
|
|
|
|
|
users.Add(user); |
|
|
|
|
} |
|
|
|
|
@ -308,17 +308,5 @@ namespace Bit.Core.Utilities
@@ -308,17 +308,5 @@ namespace Bit.Core.Utilities
|
|
|
|
|
FlattenGroupsToUsers(groupsInThisGroup, usersInThisGroup, allGroups, allUsers); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private static DateTime? ParseDate(ResultPropertyCollection collection, string dateKey) |
|
|
|
|
{ |
|
|
|
|
DateTime date; |
|
|
|
|
if(collection.Contains(dateKey) && collection[dateKey].Count > 0 && |
|
|
|
|
DateTime.TryParse(collection[dateKey][0].ToString(), out date)) |
|
|
|
|
{ |
|
|
|
|
return date; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|