This commit is contained in:
vfedosevich 2015-01-20 00:32:49 -08:00
commit a73635537a
2961 changed files with 73947 additions and 9088 deletions

View file

@ -1,4 +1,4 @@
// Copyright (c) 2014, Outercurve Foundation.
// Copyright (c) 2015, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
@ -1216,6 +1216,20 @@ namespace WebsitePanel.EnterpriseServer
return account;
}
public static ExchangeAccount GetAccountByAccountName(string primaryEmailAddress)
{
ExchangeAccount account = ObjectUtils.FillObjectFromDataReader<ExchangeAccount>(
DataProvider.GetExchangeAccountByAccountNameWithoutItemId(primaryEmailAddress));
if (account == null)
return null;
// decrypt password
account.AccountPassword = CryptoUtils.Decrypt(account.AccountPassword);
return account;
}
public static bool CheckAccountCredentials(int itemId, string email, string password)
{
// place log record