public ActionResult UpdateProfileSettings(UpdateProfileSettingsRequest request) { ActionResult actionResult = new ActionResult(); try { int pid = request.PortalId ?? PortalSettings.PortalId; if (!UserInfo.IsSuperUser && PortalSettings.PortalId != pid) { actionResult.AddError(HttpStatusCode.Unauthorized.ToString(), Components.Constants.AuthFailureMessage); } if (actionResult.IsSuccess) { if (Config.GetFriendlyUrlProvider() == "advanced") { PortalController.UpdatePortalSetting(pid, FriendlyUrlSettings.RedirectOldProfileUrlSetting, request.RedirectOldProfileUrl ? "Y" : "N", true); } PortalController.UpdatePortalSetting(pid, FriendlyUrlSettings.VanityUrlPrefixSetting, request.VanityUrlPrefix, false); PortalController.UpdatePortalSetting(pid, "Profile_DefaultVisibility", request.ProfileDefaultVisibility.ToString(), false); PortalController.UpdatePortalSetting(pid, "Profile_DisplayVisibility", request.ProfileDisplayVisibility.ToString(), false); DataCache.ClearPortalCache(pid, false); } } catch (Exception exc) { actionResult.AddError(HttpStatusCode.InternalServerError.ToString(), exc.Message); } return(actionResult); }
protected void OnRemoveAllModulesClick(object sender, EventArgs e) { //Remove all Modules foreach (DesktopModuleInfo desktopModule in DesktopModuleController.GetDesktopModules(Null.NullInteger).Values) { DesktopModuleController.RemoveDesktopModuleFromPortal(_portalId, desktopModule.DesktopModuleID, false); } DataCache.ClearPortalCache(_portalId, false); BindDesktopModules(); }
protected void OnAddAllModulesClick(object sender, EventArgs e) { //Add all Modules foreach (DesktopModuleInfo desktopModule in DesktopModuleController.GetDesktopModules(Null.NullInteger).Values) { DesktopModuleController.AddDesktopModuleToPortal(_portalId, desktopModule.DesktopModuleID, true, false); } DataCache.ClearPortalCache(_portalId, false); BindDesktopModules(); }
protected void OnRemoveModuleClick(object sender, DualListBoxEventArgs e) { if (e.Items != null) { foreach (string desktopModule in e.Items) { DesktopModuleController.RemoveDesktopModuleFromPortal(_portalId, int.Parse(desktopModule), false); } } DataCache.ClearPortalCache(_portalId, false); BindDesktopModules(); }
protected void cmdRestore_Click(object sender, EventArgs e) { if (chkPortal.Checked) { SkinController.SetSkin(SkinInfo.RootSkin, PortalId, SkinType.Portal, ""); SkinController.SetSkin(SkinInfo.RootContainer, PortalId, SkinType.Portal, ""); } if (chkAdmin.Checked) { SkinController.SetSkin(SkinInfo.RootSkin, PortalId, SkinType.Admin, ""); SkinController.SetSkin(SkinInfo.RootContainer, PortalId, SkinType.Admin, ""); } DataCache.ClearPortalCache(PortalId, true); Response.Redirect(Request.RawUrl); }
/// ----------------------------------------------------------------------------- /// <summary> /// cmdUpdate_Click runs when the Update Button is clicked /// </summary> /// <history> /// [cnurse] 03/01/2006 Created /// </history> /// ----------------------------------------------------------------------------- private void cmdUpdate_Click(Object sender, EventArgs e) { if (IsUserOrAdmin == false) { return; } if (AddUser) { if (IsValid) { CreateUser(); DataCache.ClearPortalCache(PortalId, true); } } else { if (userForm.IsValid && (User != null)) { if (User.UserID == PortalSettings.AdministratorId) { //Clear the Portal Cache DataCache.ClearPortalCache(UserPortalID, true); } try { //Update DisplayName to conform to Format UpdateDisplayName(); //either update the username or update the user details if (CanUpdateUsername()) { UserController.ChangeUsername(User.UserID, renameUserName.Value.ToString()); } UserController.UpdateUser(UserPortalID, User); OnUserUpdated(EventArgs.Empty); OnUserUpdateCompleted(EventArgs.Empty); } catch (Exception exc) { Logger.Error(exc); var args = new UserUpdateErrorArgs(User.UserID, User.Username, "EmailError"); OnUserUpdateError(args); } } } }
private ActionResult UpdateSslSettings(Entities.UpdateSslSettingsRequest request) { ActionResult ActionResult = new ActionResult(); try { PortalSettings PortalSettings = PortalController.Instance.GetCurrentSettings() as PortalSettings; bool PreviousValue_SSLEnabled = PortalController.GetPortalSettingAsBoolean("SSLEnabled", PortalSettings.PortalId, false); PortalController.UpdatePortalSetting(PortalSettings.PortalId, "SSLEnabled", request.SSLEnabled.ToString(), false); PortalController.UpdatePortalSetting(PortalSettings.PortalId, "SSLEnforced", request.SSLEnforced.ToString(), false); PortalController.UpdatePortalSetting(PortalSettings.PortalId, "SSLURL", AddPortalAlias(request.SSLURL, PortalSettings.PortalId), false); PortalController.UpdatePortalSetting(PortalSettings.PortalId, "STDURL", AddPortalAlias(request.STDURL, PortalSettings.PortalId), false); if (UserInfo.IsSuperUser) { HostController.Instance.Update("SSLOffloadHeader", request.SSLOffloadHeader); } if (PreviousValue_SSLEnabled != request.SSLEnabled) { foreach (KeyValuePair <int, TabInfo> t in TabController.Instance.GetTabsByPortal(PortalSettings.Current.PortalId)) { t.Value.IsSecure = request.SSLEnabled; TabController.Instance.UpdateTab(t.Value); } if (PortalSettings.Current != null && PortalSettings.Current.ActiveTab != null && !string.IsNullOrEmpty(PortalSettings.Current.ActiveTab.FullUrl)) { ActionResult.RedirectURL = PortalSettings.Current.ActiveTab.FullUrl; } else { ActionResult.RedirectURL = ServiceProvider.NavigationManager.NavigateURL(); } } DataCache.ClearPortalCache(PortalSettings.PortalId, false); } catch (Exception ex) { ActionResult.AddError("UpdateSslSettings", ex.Message); } return(ActionResult); }
protected void Page_Load(Object sender, EventArgs e) { try { if (Page.IsPostBack == false) { ClientAPI.AddButtonConfirm(cmdDelete, Localization.GetString("DeleteItem")); LoadSkins(); LoadContainers(); if (Request.QueryString["action"] != null) { string strType = Request.QueryString["Type"]; string strRoot = Request.QueryString["Root"]; string strName = Request.QueryString["Name"]; string strSrc = "[" + strType + "]" + strRoot + "/" + strName + "/" + Request.QueryString["Src"]; switch (Request.QueryString["action"]) { case "apply": if (strRoot == SkinInfo.RootSkin) { if (chkPortal.Checked) { SkinController.SetSkin(SkinInfo.RootSkin, PortalId, SkinType.Portal, strSrc); } if (chkAdmin.Checked) { SkinController.SetSkin(SkinInfo.RootSkin, PortalId, SkinType.Admin, strSrc); } } if (strRoot == SkinInfo.RootContainer) { if (chkPortal.Checked) { SkinController.SetSkin(SkinInfo.RootContainer, PortalId, SkinType.Portal, strSrc); } if (chkAdmin.Checked) { SkinController.SetSkin(SkinInfo.RootContainer, PortalId, SkinType.Admin, strSrc); } } DataCache.ClearPortalCache(PortalId, true); Response.Redirect(Request.RawUrl.Replace("&action=apply", "")); break; case "delete": File.Delete(Request.MapPath(SkinController.FormatSkinSrc(strSrc, PortalSettings))); LoadSkins(); LoadContainers(); break; } } } if (PortalSettings.ActiveTab.IsSuperTab) { typeRow.Visible = false; } else { typeRow.Visible = true; } } catch (Exception exc) //Module failed to load { Exceptions.ProcessModuleLoadException(this, exc); } }
/// ----------------------------------------------------------------------------- /// <summary> /// cmdUpdate_Click runs when the Update Button is clicked /// </summary> private void cmdUpdate_Click(Object sender, EventArgs e) { if (IsUserOrAdmin == false) { return; } if (AddUser) { if (IsValid) { CreateUser(); DataCache.ClearPortalCache(PortalId, true); } } else { if (userForm.IsValid && (User != null)) { if (User.UserID == PortalSettings.AdministratorId) { //Clear the Portal Cache DataCache.ClearPortalCache(UserPortalID, true); } try { //Update DisplayName to conform to Format UpdateDisplayName(); //either update the username or update the user details if (CanUpdateUsername() && !PortalSettings.Registration.UseEmailAsUserName) { UserController.ChangeUsername(User.UserID, renameUserName.Value.ToString()); } //DNN-5874 Check if unique display name is required if (PortalSettings.Registration.RequireUniqueDisplayName) { var usersWithSameDisplayName = (System.Collections.Generic.List <UserInfo>)MembershipProvider.Instance().GetUsersBasicSearch(PortalId, 0, 2, "DisplayName", true, "DisplayName", User.DisplayName); if (usersWithSameDisplayName.Any(user => user.UserID != User.UserID)) { UI.Skins.Skin.AddModuleMessage(this, LocalizeString("DisplayNameNotUnique"), UI.Skins.Controls.ModuleMessage.ModuleMessageType.RedError); return; } } UserController.UpdateUser(UserPortalID, User); if (PortalSettings.Registration.UseEmailAsUserName && (User.Username.ToLower() != User.Email.ToLower())) { UserController.ChangeUsername(User.UserID, User.Email); } OnUserUpdated(EventArgs.Empty); OnUserUpdateCompleted(EventArgs.Empty); } catch (Exception exc) { Logger.Error(exc); var args = new UserUpdateErrorArgs(User.UserID, User.Username, "EmailError"); OnUserUpdateError(args); } } } }
/// <summary> /// cmdRegister_Click runs when the Register Button is clicked /// </summary> /// <history> /// [cnurse] 9/13/2004 Updated to reflect design changes for Help, 508 support /// and localisation /// [cnurse] 10/06/2004 System Messages now handled by Localization /// </history> protected void cmdRegister_Click(Object sender, EventArgs E) { try { // Only attempt a save/update if all form fields on the page are valid if (Page.IsValid) { // Add New User to Portal User Database UserInfo objUserInfo; objUserInfo = UserController.GetUserByName(PortalId, userControl.UserName, false); if (Request.IsAuthenticated) { if (!String.IsNullOrEmpty(userControl.Password) || !String.IsNullOrEmpty(userControl.Confirm)) { if (userControl.Password != userControl.Confirm) { UI.Skins.Skin.AddModuleMessage(this, Localization.GetString("PasswordMatchFailure", this.LocalResourceFile), ModuleMessageType.YellowWarning); } return; } string Username = null; if (UserInfo.UserID >= 0) { Username = UserInfo.Username; } //if a user is found with that username and the username isn't our current user's username if (objUserInfo != null && userControl.UserName != Username) { //username already exists in DB so show user an error UI.Skins.Skin.AddModuleMessage(this, string.Format(Localization.GetString("RegistrationFailure", this.LocalResourceFile), userControl.UserName), ModuleMessageType.YellowWarning); } else { //update the user if (objUserInfo != null) { objUserInfo.UserID = UserInfo.UserID; objUserInfo.PortalID = PortalId; objUserInfo.Profile.FirstName = userControl.FirstName; objUserInfo.Profile.LastName = userControl.LastName; objUserInfo.Profile.Unit = addressUser.Unit; objUserInfo.Profile.Street = addressUser.Street; objUserInfo.Profile.City = addressUser.City; objUserInfo.Profile.Region = addressUser.Region; objUserInfo.Profile.PostalCode = addressUser.Postal; objUserInfo.Profile.Country = addressUser.Country; objUserInfo.Profile.Telephone = addressUser.Telephone; objUserInfo.Email = userControl.Email; objUserInfo.Username = userControl.UserName; objUserInfo.Profile.Cell = addressUser.Cell; objUserInfo.Profile.Fax = addressUser.Fax; objUserInfo.Profile.IM = userControl.IM; objUserInfo.Profile.Website = userControl.Website; objUserInfo.Profile.PreferredLocale = cboLocale.SelectedItem.Value; objUserInfo.Profile.TimeZone = Convert.ToInt32(cboTimeZone.SelectedItem.Value); //Update the User UserController.UpdateUser(PortalId, objUserInfo); //store preferredlocale in cookie Localization.SetLanguage(objUserInfo.Profile.PreferredLocale); } //clear the portal cache if current user is portal administrator (catch email adress changes) if (UserInfo.UserID == PortalSettings.AdministratorId) { DataCache.ClearPortalCache(PortalId, true); } // Redirect browser back to home page Response.Redirect(Convert.ToString(ViewState["UrlReferrer"]), true); } } else { UserCreateStatus userCreateStatus; //if a user is found with that username, error. //this prevents you from adding a username //with the same name as a superuser. if (objUserInfo != null) { //username already exists in DB so show user an error UI.Skins.Skin.AddModuleMessage(this, string.Format(Localization.GetString("RegistrationFailure", this.LocalResourceFile), userControl.UserName), ModuleMessageType.YellowWarning); return; } int AffiliateId = Null.NullInteger; if (Request.Cookies["AffiliateId"] != null) { AffiliateId = int.Parse(Request.Cookies["AffiliateId"].Value); } UserInfo objNewUser = new UserInfo(); objNewUser.PortalID = PortalId; objNewUser.Profile.FirstName = userControl.FirstName; objNewUser.Profile.LastName = userControl.LastName; objNewUser.Profile.Unit = addressUser.Unit; objNewUser.Profile.Street = addressUser.Street; objNewUser.Profile.City = addressUser.City; objNewUser.Profile.Region = addressUser.Region; objNewUser.Profile.PostalCode = addressUser.Postal; objNewUser.Profile.Country = addressUser.Country; objNewUser.Profile.Telephone = addressUser.Telephone; objNewUser.Email = userControl.Email; objNewUser.Username = userControl.UserName; objNewUser.Membership.Password = userControl.Password; objNewUser.Membership.Approved = Convert.ToBoolean(PortalSettings.UserRegistration != (int)Globals.PortalRegistrationType.PublicRegistration ? false : true); objNewUser.AffiliateID = AffiliateId; objNewUser.Profile.Cell = addressUser.Cell; objNewUser.Profile.Fax = addressUser.Fax; objNewUser.Profile.IM = userControl.IM; objNewUser.Profile.Website = userControl.Website; objNewUser.Profile.PreferredLocale = cboLocale.SelectedItem.Value; objNewUser.Profile.TimeZone = Convert.ToInt32(cboTimeZone.SelectedItem.Value); userCreateStatus = UserController.CreateUser(ref objNewUser); if (userCreateStatus == UserCreateStatus.Success) { EventLogController objEventLog = new EventLogController(); objEventLog.AddLog(objNewUser, PortalSettings, UserId, userControl.UserName, EventLogController.EventLogType.USER_CREATED); // send notification to portal administrator of new user registration Mail.SendMail(PortalSettings.Email, PortalSettings.Email, "", Localization.GetSystemMessage(PortalSettings.DefaultLanguage, PortalSettings, "EMAIL_USER_REGISTRATION_ADMINISTRATOR_SUBJECT", objNewUser), Localization.GetSystemMessage(PortalSettings.DefaultLanguage, PortalSettings, "EMAIL_USER_REGISTRATION_ADMINISTRATOR_BODY", objNewUser), "", "", "", "", "", ""); // complete registration string strMessage = ""; if (PortalSettings.UserRegistration == (int)Globals.PortalRegistrationType.PrivateRegistration) { Mail.SendMail(PortalSettings.Email, userControl.Email, "", Localization.GetSystemMessage(objNewUser.Profile.PreferredLocale, PortalSettings, "EMAIL_USER_REGISTRATION_PRIVATE_SUBJECT", objNewUser), Localization.GetSystemMessage(objNewUser.Profile.PreferredLocale, PortalSettings, "EMAIL_USER_REGISTRATION_PRIVATE_BODY", objNewUser), "", "", "", "", "", ""); //show a message that a portal administrator has to verify the user credentials strMessage = string.Format(Localization.GetString("PrivateConfirmationMessage", this.LocalResourceFile), userControl.Email); } else if (PortalSettings.UserRegistration == (int)Globals.PortalRegistrationType.PublicRegistration) { UserLoginStatus loginStatus = 0; UserController.UserLogin(PortalSettings.PortalId, userControl.UserName, userControl.Password, "", PortalSettings.PortalName, "", ref loginStatus, false); } else if (PortalSettings.UserRegistration == (int)Globals.PortalRegistrationType.VerifiedRegistration) { Mail.SendMail(PortalSettings.Email, userControl.Email, "", Localization.GetSystemMessage(objNewUser.Profile.PreferredLocale, PortalSettings, "EMAIL_USER_REGISTRATION_PUBLIC_SUBJECT", objNewUser), Localization.GetSystemMessage(objNewUser.Profile.PreferredLocale, PortalSettings, "EMAIL_USER_REGISTRATION_PUBLIC_BODY", objNewUser), "", "", "", "", "", ""); //show a message that an email has been send with the registration details strMessage = string.Format(Localization.GetString("VerifiedConfirmationMessage", this.LocalResourceFile), userControl.Email); } // affiliate if (!Null.IsNull(AffiliateId)) { AffiliateController objAffiliates = new AffiliateController(); objAffiliates.UpdateAffiliateStats(AffiliateId, 0, 1); } //store preferredlocale in cookie Localization.SetLanguage(objNewUser.Profile.PreferredLocale); if (strMessage.Length != 0) { UI.Skins.Skin.AddModuleMessage(this, strMessage, ModuleMessageType.GreenSuccess); UserRow.Visible = false; cmdRegister.Visible = false; cmdUnregister.Visible = false; cmdCancel.Visible = false; } else { // Redirect browser back to home page Response.Redirect(Convert.ToString(ViewState["UrlReferrer"]), true); } } else // registration error { UI.Skins.Skin.AddModuleMessage(this, UserController.GetUserCreateStatus(userCreateStatus), ModuleMessageType.RedError); } } } } catch (Exception exc) //Module failed to load { Exceptions.ProcessModuleLoadException(this, exc); } }
/// ----------------------------------------------------------------------------- /// <summary> /// cmdUpdate_Click runs when the Update LinkButton is clicked. /// It saves the current Site Settings /// </summary> /// <remarks> /// </remarks> /// <history> /// [cnurse] 9/9/2004 Modified /// [aprasad] 1/17/2011 New setting AutoAddPortalAlias /// </history> /// ----------------------------------------------------------------------------- protected void UpdatePortal(object sender, EventArgs e) { if (Page.IsValid) { try { var objPortalController = new PortalController(); PortalInfo objPortal = objPortalController.GetPortal(_portalId); string strLogo = String.Format("FileID={0}", ctlLogo.FileID); string strBackground = String.Format("FileID={0}", ctlBackground.FileID); //Refresh if Background or Logo file have changed bool refreshPage = (strBackground == objPortal.BackgroundFile || strLogo == objPortal.LogoFile); double dblHostFee = 0; if (!String.IsNullOrEmpty(txtHostFee.Text)) { dblHostFee = double.Parse(txtHostFee.Text); } double dblHostSpace = 0; if (!String.IsNullOrEmpty(txtHostSpace.Text)) { dblHostSpace = double.Parse(txtHostSpace.Text); } int intPageQuota = 0; if (!String.IsNullOrEmpty(txtPageQuota.Text)) { intPageQuota = int.Parse(txtPageQuota.Text); } double intUserQuota = 0; if (!String.IsNullOrEmpty(txtUserQuota.Text)) { intUserQuota = int.Parse(txtUserQuota.Text); } int intSiteLogHistory = 0; if (!String.IsNullOrEmpty(txtSiteLogHistory.Text)) { intSiteLogHistory = int.Parse(txtSiteLogHistory.Text); } DateTime datExpiryDate = Null.NullDate; if (datepickerExpiryDate.SelectedDate.HasValue) { datExpiryDate = datepickerExpiryDate.SelectedDate.Value; } int intSplashTabId = Null.NullInteger; if (cboSplashTabId.SelectedItem != null) { intSplashTabId = int.Parse(cboSplashTabId.SelectedItem.Value); } int intHomeTabId = Null.NullInteger; if (cboHomeTabId.SelectedItem != null) { intHomeTabId = int.Parse(cboHomeTabId.SelectedItem.Value); } int intLoginTabId = Null.NullInteger; if (cboLoginTabId.SelectedItem != null) { intLoginTabId = int.Parse(cboLoginTabId.SelectedItem.Value); } int intRegisterTabId = Null.NullInteger; if (cboRegisterTabId.SelectedItem != null) { intRegisterTabId = int.Parse(cboRegisterTabId.SelectedItem.Value); } int intUserTabId = Null.NullInteger; if (cboUserTabId.SelectedItem != null) { intUserTabId = int.Parse(cboUserTabId.SelectedItem.Value); } int intSearchTabId = Null.NullInteger; if (cboSearchTabId.SelectedItem != null) { intSearchTabId = int.Parse(cboSearchTabId.SelectedItem.Value); } if (txtPassword.Attributes["value"] != null) { txtPassword.Attributes["value"] = txtPassword.Text; } //check only relevant fields altered if (!UserInfo.IsSuperUser) { bool hostChanged = false; if (dblHostFee != objPortal.HostFee) { hostChanged = true; } if (dblHostSpace != objPortal.HostSpace) { hostChanged = true; } if (intPageQuota != objPortal.PageQuota) { hostChanged = true; } if (intUserQuota != objPortal.UserQuota) { hostChanged = true; } if (intSiteLogHistory != objPortal.SiteLogHistory) { hostChanged = true; } if (datExpiryDate != objPortal.ExpiryDate) { hostChanged = true; } if (hostChanged) { throw new Exception(); } } objPortalController.UpdatePortalInfo(_portalId, txtPortalName.Text, strLogo, txtFooterText.Text, datExpiryDate, optUserRegistration.SelectedIndex, optBanners.SelectedIndex, currencyCombo.SelectedItem.Value, Convert.ToInt32(cboAdministratorId.SelectedItem.Value), dblHostFee, dblHostSpace, intPageQuota, (int)intUserQuota, String.IsNullOrEmpty(processorCombo.SelectedValue) ? "" : processorCombo.SelectedItem.Text, txtUserId.Text, txtPassword.Text, txtDescription.Text, txtKeyWords.Text, strBackground, intSiteLogHistory, intSplashTabId, intHomeTabId, intLoginTabId, intRegisterTabId, intUserTabId, intSearchTabId, objPortal.DefaultLanguage, lblHomeDirectory.Text, SelectedCultureCode); if (!refreshPage) { refreshPage = (PortalSettings.DefaultAdminSkin == editSkinCombo.SelectedValue) || (PortalSettings.DefaultAdminContainer == editContainerCombo.SelectedValue); } PortalController.UpdatePortalSetting(_portalId, "EnableSkinWidgets", chkSkinWidgestEnabled.Checked.ToString(), false); PortalController.UpdatePortalSetting(_portalId, "DefaultAdminSkin", editSkinCombo.SelectedValue, false); PortalController.UpdatePortalSetting(_portalId, "DefaultPortalSkin", portalSkinCombo.SelectedValue, false); PortalController.UpdatePortalSetting(_portalId, "DefaultAdminContainer", editContainerCombo.SelectedValue, false); PortalController.UpdatePortalSetting(_portalId, "DefaultPortalContainer", portalContainerCombo.SelectedValue, false); PortalController.UpdatePortalSetting(_portalId, "EnablePopups", enablePopUpsCheckBox.Checked.ToString(), false); PortalController.UpdatePortalSetting(_portalId, "InlineEditorEnabled", chkInlineEditor.Checked.ToString(), false); PortalController.UpdatePortalSetting(_portalId, "HideFoldersEnabled", chkHideSystemFolders.Checked.ToString(), false); PortalController.UpdatePortalSetting(_portalId, "ControlPanelMode", optControlPanelMode.SelectedItem.Value, false); PortalController.UpdatePortalSetting(_portalId, "ControlPanelVisibility", optControlPanelVisibility.SelectedItem.Value, false); PortalController.UpdatePortalSetting(_portalId, "ControlPanelSecurity", optControlPanelSecurity.SelectedItem.Value, false); PortalController.UpdatePortalSetting(_portalId, "paypalsandbox", chkPayPalSandboxEnabled.Checked.ToString(), false); PortalController.UpdatePortalSetting(_portalId, "paypalsubscriptionreturn", txtPayPalReturnURL.Text, false); PortalController.UpdatePortalSetting(_portalId, "paypalsubscriptioncancelreturn", txtPayPalCancelURL.Text, false); PortalController.UpdatePortalSetting(_portalId, "TimeZone", cboTimeZone.SelectedValue, false); PortalController.UpdatePortalSetting(_portalId, "PortalAliasMapping", portalAliasModeButtonList.SelectedValue, false); PortalController.UpdatePortalSetting(_portalId, "DefaultPortalAlias", defaultAliasDropDown.SelectedValue, false); HostController.Instance.Update("AutoAddPortalAlias", chkAutoAddPortalAlias.Checked ? "Y" : "N", true); new FavIcon(_portalId).Update(ctlFavIcon.FileID); if (IsSuperUser()) { PortalController.UpdatePortalSetting(_portalId, "SSLEnabled", chkSSLEnabled.Checked.ToString(), false); PortalController.UpdatePortalSetting(_portalId, "SSLEnforced", chkSSLEnforced.Checked.ToString(), false); PortalController.UpdatePortalSetting(_portalId, "SSLURL", AddPortalAlias(txtSSLURL.Text, _portalId), false); PortalController.UpdatePortalSetting(_portalId, "STDURL", AddPortalAlias(txtSTDURL.Text, _portalId), false); } //Redirect to this site to refresh only if admin skin changed or either of the images have changed if (refreshPage) { Response.Redirect(Request.RawUrl, true); } DataCache.ClearPortalCache(PortalId, false); BindPortal(_portalId, SelectedCultureCode); } catch (Exception exc) { Exceptions.ProcessModuleLoadException(this, exc); } finally { DataCache.ClearPortalCache(_portalId, false); } } }