Replaced upn by samaccountname as accountname in exchange accounts
ContactGeneralSettings reformatted
This commit is contained in:
parent
8d42682200
commit
695c0bc94f
5 changed files with 55 additions and 57 deletions
|
@ -767,7 +767,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
// load account
|
// load account
|
||||||
ExchangeAccount account = GetAccount(itemId, accountId);
|
ExchangeAccount account = GetAccount(itemId, accountId);
|
||||||
|
|
||||||
return exchange.GetMailboxStatistics(account.AccountName);
|
return exchange.GetMailboxStatistics(account.UserPrincipalName);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -1241,6 +1241,9 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
string CounterStr = "00000";
|
string CounterStr = "00000";
|
||||||
int counter = 0;
|
int counter = 0;
|
||||||
bool bFound = false;
|
bool bFound = false;
|
||||||
|
|
||||||
|
if (!AccountExists(accountName)) return accountName;
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
accountName = genSamLogin(name, CounterStr);
|
accountName = genSamLogin(name, CounterStr);
|
||||||
|
@ -1819,7 +1822,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
// delete mailbox
|
// delete mailbox
|
||||||
int serviceExchangeId = GetExchangeServiceID(org.PackageId);
|
int serviceExchangeId = GetExchangeServiceID(org.PackageId);
|
||||||
ExchangeServer exchange = GetExchangeServer(serviceExchangeId, org.ServiceId);
|
ExchangeServer exchange = GetExchangeServer(serviceExchangeId, org.ServiceId);
|
||||||
exchange.DisableMailbox(account.AccountName);
|
exchange.DisableMailbox(account.UserPrincipalName);
|
||||||
|
|
||||||
account.AccountType = ExchangeAccountType.User;
|
account.AccountType = ExchangeAccountType.User;
|
||||||
account.MailEnabledPublicFolder = false;
|
account.MailEnabledPublicFolder = false;
|
||||||
|
@ -1869,7 +1872,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
// delete mailbox
|
// delete mailbox
|
||||||
int serviceExchangeId = GetExchangeServiceID(org.PackageId);
|
int serviceExchangeId = GetExchangeServiceID(org.PackageId);
|
||||||
ExchangeServer exchange = GetExchangeServer(serviceExchangeId, org.ServiceId);
|
ExchangeServer exchange = GetExchangeServer(serviceExchangeId, org.ServiceId);
|
||||||
exchange.DeleteMailbox(account.AccountName);
|
exchange.DeleteMailbox(account.UserPrincipalName);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1944,7 +1947,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
int exchangeServiceId = GetExchangeServiceID(org.PackageId);
|
int exchangeServiceId = GetExchangeServiceID(org.PackageId);
|
||||||
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
||||||
return exchange.GetMailboxGeneralSettings(account.AccountName);
|
return exchange.GetMailboxGeneralSettings(account.UserPrincipalName);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -1991,7 +1994,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
hideAddressBook = true;
|
hideAddressBook = true;
|
||||||
|
|
||||||
exchange.SetMailboxGeneralSettings(
|
exchange.SetMailboxGeneralSettings(
|
||||||
account.AccountName,
|
account.UserPrincipalName,
|
||||||
hideAddressBook,
|
hideAddressBook,
|
||||||
disabled);
|
disabled);
|
||||||
|
|
||||||
|
@ -2063,7 +2066,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
||||||
|
|
||||||
exchange.SetMailboxEmailAddresses(
|
exchange.SetMailboxEmailAddresses(
|
||||||
account.AccountName,
|
account.UserPrincipalName,
|
||||||
GetAccountSimpleEmailAddresses(itemId, accountId));
|
GetAccountSimpleEmailAddresses(itemId, accountId));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -2119,7 +2122,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
||||||
|
|
||||||
exchange.SetMailboxPrimaryEmailAddress(
|
exchange.SetMailboxPrimaryEmailAddress(
|
||||||
account.AccountName,
|
account.UserPrincipalName,
|
||||||
emailAddress);
|
emailAddress);
|
||||||
|
|
||||||
if (DataProvider.CheckOCSUserExists(account.AccountId))
|
if (DataProvider.CheckOCSUserExists(account.AccountId))
|
||||||
|
@ -2187,7 +2190,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
||||||
|
|
||||||
exchange.SetMailboxEmailAddresses(
|
exchange.SetMailboxEmailAddresses(
|
||||||
account.AccountName,
|
account.UserPrincipalName,
|
||||||
GetAccountSimpleEmailAddresses(itemId, accountId));
|
GetAccountSimpleEmailAddresses(itemId, accountId));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -2228,7 +2231,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
// get mailbox settings
|
// get mailbox settings
|
||||||
int exchangeServiceId = GetExchangeServiceID(org.PackageId);
|
int exchangeServiceId = GetExchangeServiceID(org.PackageId);
|
||||||
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
||||||
ExchangeMailbox mailbox = exchange.GetMailboxMailFlowSettings(account.AccountName);
|
ExchangeMailbox mailbox = exchange.GetMailboxMailFlowSettings(account.UserPrincipalName);
|
||||||
mailbox.DisplayName = account.DisplayName;
|
mailbox.DisplayName = account.DisplayName;
|
||||||
return mailbox;
|
return mailbox;
|
||||||
}
|
}
|
||||||
|
@ -2273,7 +2276,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
int exchangeServiceId = GetExchangeServiceID(org.PackageId);
|
int exchangeServiceId = GetExchangeServiceID(org.PackageId);
|
||||||
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
||||||
|
|
||||||
exchange.SetMailboxMailFlowSettings(account.AccountName,
|
exchange.SetMailboxMailFlowSettings(account.UserPrincipalName,
|
||||||
enableForwarding,
|
enableForwarding,
|
||||||
forwardingAccountName,
|
forwardingAccountName,
|
||||||
forwardToBoth,
|
forwardToBoth,
|
||||||
|
@ -2321,7 +2324,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
// get mailbox settings
|
// get mailbox settings
|
||||||
int exchangeServiceId = GetExchangeServiceID(org.PackageId);
|
int exchangeServiceId = GetExchangeServiceID(org.PackageId);
|
||||||
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
||||||
ExchangeMailbox mailbox = exchange.GetMailboxAdvancedSettings(account.AccountName);
|
ExchangeMailbox mailbox = exchange.GetMailboxAdvancedSettings(account.UserPrincipalName);
|
||||||
mailbox.DisplayName = account.DisplayName;
|
mailbox.DisplayName = account.DisplayName;
|
||||||
return mailbox;
|
return mailbox;
|
||||||
}
|
}
|
||||||
|
@ -2529,7 +2532,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
// get mailbox settings
|
// get mailbox settings
|
||||||
int exchangeServiceId = GetExchangeServiceID(org.PackageId);
|
int exchangeServiceId = GetExchangeServiceID(org.PackageId);
|
||||||
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
||||||
ExchangeMailbox mailbox = exchange.GetMailboxPermissions(org.OrganizationId, account.AccountName);
|
ExchangeMailbox mailbox = exchange.GetMailboxPermissions(org.OrganizationId, account.UserPrincipalName);
|
||||||
mailbox.DisplayName = account.DisplayName;
|
mailbox.DisplayName = account.DisplayName;
|
||||||
return mailbox;
|
return mailbox;
|
||||||
}
|
}
|
||||||
|
@ -2571,7 +2574,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
int exchangeServiceId = GetExchangeServiceID(org.PackageId);
|
int exchangeServiceId = GetExchangeServiceID(org.PackageId);
|
||||||
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId);
|
||||||
|
|
||||||
exchange.SetMailboxPermissions(org.OrganizationId, account.AccountName, sendAsaccounts, fullAccessAcounts);
|
exchange.SetMailboxPermissions(org.OrganizationId, account.UserPrincipalName, sendAsaccounts, fullAccessAcounts);
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -2656,7 +2659,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
exchange.SetMailboxAdvancedSettings(
|
exchange.SetMailboxAdvancedSettings(
|
||||||
org.OrganizationId,
|
org.OrganizationId,
|
||||||
account.AccountName,
|
account.UserPrincipalName,
|
||||||
plan.EnablePOP,
|
plan.EnablePOP,
|
||||||
plan.EnableIMAP,
|
plan.EnableIMAP,
|
||||||
plan.EnableOWA,
|
plan.EnableOWA,
|
||||||
|
|
|
@ -1336,11 +1336,11 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
if (orgProxy.CreateUser(org.OrganizationId, sAMAccountName, displayName, upn, password, enabled) == 0)
|
if (orgProxy.CreateUser(org.OrganizationId, sAMAccountName, displayName, upn, password, enabled) == 0)
|
||||||
{
|
{
|
||||||
OrganizationUser retUser = orgProxy.GetUserGeneralSettings(upn, org.OrganizationId);
|
accountName = sAMAccountName;
|
||||||
|
OrganizationUser retUser = orgProxy.GetUserGeneralSettings(sAMAccountName, org.OrganizationId);
|
||||||
TaskManager.Write("sAMAccountName :" + retUser.DomainUserName);
|
TaskManager.Write("sAMAccountName :" + retUser.DomainUserName);
|
||||||
|
|
||||||
userId = AddOrganizationUser(itemId, upn, displayName, email, retUser.DomainUserName, password, subscriberNumber);
|
userId = AddOrganizationUser(itemId, sAMAccountName, displayName, email, retUser.DomainUserName, password, subscriberNumber);
|
||||||
accountName = upn;
|
|
||||||
|
|
||||||
// register email address
|
// register email address
|
||||||
AddAccountEmailAddress(userId, email);
|
AddAccountEmailAddress(userId, email);
|
||||||
|
@ -1432,7 +1432,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
TaskManager.Write("sAMAccountName :" + retUser.DomainUserName);
|
TaskManager.Write("sAMAccountName :" + retUser.DomainUserName);
|
||||||
|
|
||||||
userId = AddOrganizationUser(itemId, accountName, displayName, email, retUser.DomainUserName, password, subscriberNumber);
|
userId = AddOrganizationUser(itemId, retUser.SamAccountName, displayName, email, retUser.DomainUserName, password, subscriberNumber);
|
||||||
|
|
||||||
AddAccountEmailAddress(userId, email);
|
AddAccountEmailAddress(userId, email);
|
||||||
|
|
||||||
|
@ -1461,6 +1461,9 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
string CounterStr = "00000";
|
string CounterStr = "00000";
|
||||||
int counter = 0;
|
int counter = 0;
|
||||||
bool bFound = false;
|
bool bFound = false;
|
||||||
|
|
||||||
|
if (!AccountExists(accountName)) return accountName;
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
accountName = genSamLogin(name, CounterStr);
|
accountName = genSamLogin(name, CounterStr);
|
||||||
|
|
|
@ -371,7 +371,7 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
userPath = GetUserPath(organizationId, loginName);
|
userPath = GetUserPath(organizationId, loginName);
|
||||||
if (!ActiveDirectoryUtils.AdObjectExists(userPath))
|
if (!ActiveDirectoryUtils.AdObjectExists(userPath))
|
||||||
{
|
{
|
||||||
userPath = ActiveDirectoryUtils.CreateUser(path, upn, loginName, displayName, password, enabled);
|
userPath = ActiveDirectoryUtils.CreateUser(path, null, loginName, displayName, password, enabled);
|
||||||
DirectoryEntry entry = new DirectoryEntry(userPath);
|
DirectoryEntry entry = new DirectoryEntry(userPath);
|
||||||
ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.UserPrincipalName, upn);
|
ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.UserPrincipalName, upn);
|
||||||
entry.CommitChanges();
|
entry.CommitChanges();
|
||||||
|
|
|
@ -78,8 +78,17 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td class="FormLabel150"><asp:Localize ID="locNotes" runat="server" meta:resourcekey="locNotes" Text="Notes:"></asp:Localize></td>
|
||||||
|
<td>
|
||||||
|
<asp:TextBox ID="txtNotes" runat="server" CssClass="TextBox200" Rows="4" TextMode="MultiLine"></asp:TextBox>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
<wsp:CollapsiblePanel id="secCompanyInfo" runat="server"
|
<wsp:CollapsiblePanel id="secCompanyInfo" runat="server" IsCollapsed="true"
|
||||||
TargetControlID="CompanyInfo" meta:resourcekey="secCompanyInfo" Text="Company Information">
|
TargetControlID="CompanyInfo" meta:resourcekey="secCompanyInfo" Text="Company Information">
|
||||||
</wsp:CollapsiblePanel>
|
</wsp:CollapsiblePanel>
|
||||||
<asp:Panel ID="CompanyInfo" runat="server" Height="0" style="overflow:hidden;">
|
<asp:Panel ID="CompanyInfo" runat="server" Height="0" style="overflow:hidden;">
|
||||||
|
@ -121,7 +130,7 @@
|
||||||
</asp:Panel>
|
</asp:Panel>
|
||||||
|
|
||||||
|
|
||||||
<wsp:CollapsiblePanel id="secContactInfo" runat="server"
|
<wsp:CollapsiblePanel id="secContactInfo" runat="server" IsCollapsed="true"
|
||||||
TargetControlID="ContactInfo" meta:resourcekey="secContactInfo" Text="Contact Information">
|
TargetControlID="ContactInfo" meta:resourcekey="secContactInfo" Text="Contact Information">
|
||||||
</wsp:CollapsiblePanel>
|
</wsp:CollapsiblePanel>
|
||||||
<asp:Panel ID="ContactInfo" runat="server" Height="0" style="overflow:hidden;">
|
<asp:Panel ID="ContactInfo" runat="server" Height="0" style="overflow:hidden;">
|
||||||
|
@ -165,7 +174,7 @@
|
||||||
</table>
|
</table>
|
||||||
</asp:Panel>
|
</asp:Panel>
|
||||||
|
|
||||||
<wsp:CollapsiblePanel id="secAddressInfo" runat="server"
|
<wsp:CollapsiblePanel id="secAddressInfo" runat="server" IsCollapsed="true"
|
||||||
TargetControlID="AddressInfo" meta:resourcekey="secAddressInfo" Text="Address">
|
TargetControlID="AddressInfo" meta:resourcekey="secAddressInfo" Text="Address">
|
||||||
</wsp:CollapsiblePanel>
|
</wsp:CollapsiblePanel>
|
||||||
<asp:Panel ID="AddressInfo" runat="server" Height="0" style="overflow:hidden;">
|
<asp:Panel ID="AddressInfo" runat="server" Height="0" style="overflow:hidden;">
|
||||||
|
@ -204,14 +213,6 @@
|
||||||
</table>
|
</table>
|
||||||
</asp:Panel>
|
</asp:Panel>
|
||||||
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td class="FormLabel150"><asp:Localize ID="locNotes" runat="server" meta:resourcekey="locNotes" Text="Notes:"></asp:Localize></td>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="txtNotes" runat="server" CssClass="TextBox200" Rows="4" TextMode="MultiLine"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<div class="FormFooterClean">
|
<div class="FormFooterClean">
|
||||||
<asp:Button id="btnSave" runat="server" Text="Save Changes" CssClass="Button1" meta:resourcekey="btnSave" ValidationGroup="EditContact" OnClick="btnSave_Click"></asp:Button>
|
<asp:Button id="btnSave" runat="server" Text="Save Changes" CssClass="Button1" meta:resourcekey="btnSave" ValidationGroup="EditContact" OnClick="btnSave_Click"></asp:Button>
|
||||||
|
|
|
@ -228,6 +228,24 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::System.Web.UI.WebControls.TextBox txtLastName;
|
protected global::System.Web.UI.WebControls.TextBox txtLastName;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// locNotes control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.Localize locNotes;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtNotes control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.TextBox txtNotes;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// secCompanyInfo control.
|
/// secCompanyInfo control.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -570,24 +588,6 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.CountrySelector country;
|
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.CountrySelector country;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// locNotes control.
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// Auto-generated field.
|
|
||||||
/// To modify move field declaration from designer file to code-behind file.
|
|
||||||
/// </remarks>
|
|
||||||
protected global::System.Web.UI.WebControls.Localize locNotes;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// txtNotes control.
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// Auto-generated field.
|
|
||||||
/// To modify move field declaration from designer file to code-behind file.
|
|
||||||
/// </remarks>
|
|
||||||
protected global::System.Web.UI.WebControls.TextBox txtNotes;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// btnSave control.
|
/// btnSave control.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -605,14 +605,5 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
||||||
/// To modify move field declaration from designer file to code-behind file.
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::System.Web.UI.WebControls.ValidationSummary ValidationSummary1;
|
protected global::System.Web.UI.WebControls.ValidationSummary ValidationSummary1;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// FormComments control.
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// Auto-generated field.
|
|
||||||
/// To modify move field declaration from designer file to code-behind file.
|
|
||||||
/// </remarks>
|
|
||||||
protected global::System.Web.UI.WebControls.Localize FormComments;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue