This commit is contained in:
Virtuworks 2015-01-06 10:34:51 -05:00
commit 1d5840b85c
159 changed files with 34400 additions and 494 deletions

View file

@ -2684,6 +2684,17 @@ namespace WebsitePanel.EnterpriseServer
);
}
public static IDataReader GetExchangeAccountByAccountNameWithoutItemId(string primaryEmailAddress)
{
return SqlHelper.ExecuteReader(
ConnectionString,
CommandType.StoredProcedure,
"GetExchangeAccountByAccountNameWithoutItemId",
new SqlParameter("@PrimaryEmailAddress", primaryEmailAddress)
);
}
public static IDataReader GetExchangeMailboxes(int itemId)
{
return SqlHelper.ExecuteReader(

View file

@ -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