Protect UPN from Deletion when it's not the primary email address
This commit is contained in:
parent
55bdb407d1
commit
bc39c19576
2 changed files with 4 additions and 1 deletions
|
@ -1347,11 +1347,14 @@ namespace WebsitePanel.EnterpriseServer
|
|||
if (String.Compare(account.PrimaryEmailAddress, email.EmailAddress, true) == 0)
|
||||
{
|
||||
email.IsPrimary = true;
|
||||
email.ProtectDelete = true;
|
||||
}
|
||||
|
||||
if (String.Compare(account.UserPrincipalName, email.EmailAddress, true) == 0)
|
||||
{
|
||||
email.IsUserPrincipalName = true;
|
||||
email.ProtectDelete = true;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue