From 2d6acfc7fc11674484388835425e0793417d564e Mon Sep 17 00:00:00 2001 From: robvde Date: Fri, 23 Nov 2012 13:50:02 +0400 Subject: [PATCH] Fixed wsp-10062 Need to add check so that it is not possible to delete an accepted domain from a tenant or an email address from a mailbox when used in UPN --- .../Code/ExchangeServer/ExchangeServerController.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/ExchangeServer/ExchangeServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/ExchangeServer/ExchangeServerController.cs index 486e2519..7735e310 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/ExchangeServer/ExchangeServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/ExchangeServer/ExchangeServerController.cs @@ -2158,7 +2158,8 @@ namespace WebsitePanel.EnterpriseServer List toDelete = new List(); foreach (string emailAddress in emailAddresses) { - if (String.Compare(account.PrimaryEmailAddress, emailAddress, true) != 0) + if ((String.Compare(account.PrimaryEmailAddress, emailAddress, true) != 0) & + (String.Compare(account.UserPrincipalName, emailAddress, true) != 0)) toDelete.Add(emailAddress); }