loading time fix

This commit is contained in:
vfedosevich 2015-04-23 03:14:01 -07:00
parent cbff6f5964
commit 9c9fad9ba7
12 changed files with 257 additions and 14 deletions

View file

@ -1581,11 +1581,7 @@ namespace WebsitePanel.EnterpriseServer
UserInfo owner = PackageController.GetPackageOwner(org.PackageId);
OrganizationUser user = OrganizationController.GetAccount(itemId, accountId);
OrganizationUser settings = orgProxy.GetUserGeneralSettings(user.AccountName, org.OrganizationId);
user.PasswordExpirationDateTime = settings.PasswordExpirationDateTime;
OrganizationUser user = OrganizationController.GetUserGeneralSettingsWithExtraData(itemId, accountId);
if (string.IsNullOrEmpty(mailTo))
{
@ -1658,6 +1654,8 @@ namespace WebsitePanel.EnterpriseServer
}
}
public static AccessToken GetAccessToken(Guid accessToken, AccessTokenTypes type)
{
return ObjectUtils.FillObjectFromDataReader<AccessToken>(DataProvider.GetAccessTokenByAccessToken(accessToken, type));
@ -2668,6 +2666,50 @@ namespace WebsitePanel.EnterpriseServer
return (account);
}
public static OrganizationUser GetUserGeneralSettingsWithExtraData(int itemId, int accountId)
{
OrganizationUser account = null;
Organization org = null;
try
{
// load organization
org = GetOrganization(itemId);
if (org == null)
return null;
// load account
account = GetAccount(itemId, accountId);
}
catch (Exception) { }
try
{
// get mailbox settings
Organizations orgProxy = GetOrganizationProxy(org.ServiceId);
string accountName = GetAccountName(account.AccountName);
OrganizationUser retUser = orgProxy.GetOrganizationUserWithExtraData(accountName, org.OrganizationId);
retUser.AccountId = accountId;
retUser.AccountName = account.AccountName;
retUser.PrimaryEmailAddress = account.PrimaryEmailAddress;
retUser.AccountType = account.AccountType;
retUser.CrmUserId = CRMController.GetCrmUserId(accountId);
retUser.IsOCSUser = DataProvider.CheckOCSUserExists(accountId);
retUser.IsLyncUser = DataProvider.CheckLyncUserExists(accountId);
retUser.IsBlackBerryUser = BlackBerryController.CheckBlackBerryUserExists(accountId);
retUser.SubscriberNumber = account.SubscriberNumber;
retUser.LevelId = account.LevelId;
retUser.IsVIP = account.IsVIP;
return retUser;
}
catch { }
return (account);
}
public static int SetUserGeneralSettings(int itemId, int accountId, string displayName,
string password, bool hideAddressBook, bool disabled, bool locked, string firstName, string initials,
string lastName, string address, string city, string state, string zip, string country,

View file

@ -57,11 +57,6 @@ namespace WebsitePanel.EnterpriseServer
}
}
}
// send mail message
// MailHelper.SendMessage(mailFrom, mailTo, mailSubject, mailBody, false);
}
}
}