mirror of
https://github.com/bitwarden/directory-connector
synced 2025-12-16 08:14:01 +00:00
skip non-deleted users with no email
This commit is contained in:
@@ -214,7 +214,8 @@ namespace Bit.Core.Services
|
|||||||
ExternalId = user.Id,
|
ExternalId = user.Id,
|
||||||
Email = user.PrimaryEmail,
|
Email = user.PrimaryEmail,
|
||||||
Disabled = user.Suspended.GetValueOrDefault(false),
|
Disabled = user.Suspended.GetValueOrDefault(false),
|
||||||
Deleted = deleted
|
Deleted = deleted,
|
||||||
|
CreationDate = user.CreationTime
|
||||||
};
|
};
|
||||||
|
|
||||||
if(string.IsNullOrWhiteSpace(entry.Email) && !entry.Deleted)
|
if(string.IsNullOrWhiteSpace(entry.Email) && !entry.Deleted)
|
||||||
|
|||||||
@@ -355,7 +355,7 @@ namespace Bit.Core.Services
|
|||||||
SettingsService.Instance.Sync.Ldap.UserEmailSuffix).ToLowerInvariant();
|
SettingsService.Instance.Sync.Ldap.UserEmailSuffix).ToLowerInvariant();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(string.IsNullOrWhiteSpace(user.Email) && !user.Disabled && !user.Deleted)
|
if(string.IsNullOrWhiteSpace(user.Email) && !user.Deleted)
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user