password reset fixes

This commit is contained in:
vfedosevich 2015-04-22 03:27:29 -07:00
parent 6f06614e8f
commit 0287c26f95
6 changed files with 87 additions and 16 deletions

View file

@ -221,13 +221,9 @@ namespace WebsitePanel.Portal.HostedSolution
password.ValidationEnabled = true;
password.Password = string.Empty;
var settings = ES.Services.System.GetSystemSettings(EnterpriseServer.SystemSettings.WEBDAV_PORTAL_SETTINGS);
var settings = ES.Services.Organizations.GetWebDavSystemSettings();
if (settings != null)
{
btnResetUserPassword.Visible = Utils.ParseBool(settings[EnterpriseServer.SystemSettings.WEBDAV_PASSWORD_RESET_ENABLED_KEY], false);
}
btnResetUserPassword.Visible = settings != null && Utils.ParseBool(settings[EnterpriseServer.SystemSettings.WEBDAV_PASSWORD_RESET_ENABLED_KEY], false);
chkUserMustChangePassword.Checked = user.UserMustChangePassword;
}

View file

@ -164,7 +164,7 @@ namespace WebsitePanel.Portal
if (settings != null)
{
chkEnablePasswordReset.Checked = Utils.ParseBool(settings[WEBDAV_PASSWORD_RESET_ENABLED], false);
chkEnablePasswordReset.Checked = Utils.ParseBool(settings[WSP.SystemSettings.WEBDAV_PASSWORD_RESET_ENABLED_KEY], false);
txtWebdavPortalUrl.Text = settings[WEBDAV_PORTAL_URL];
}
}
@ -250,7 +250,7 @@ namespace WebsitePanel.Portal
settings = new WSP.SystemSettings();
settings[WEBDAV_PORTAL_URL] = txtWebdavPortalUrl.Text;
settings[WEBDAV_PASSWORD_RESET_ENABLED] = chkEnablePasswordReset.Checked.ToString();
settings[WSP.SystemSettings.WEBDAV_PASSWORD_RESET_ENABLED_KEY] = chkEnablePasswordReset.Checked.ToString();
result = ES.Services.System.SetSystemSettings(WSP.SystemSettings.WEBDAV_PORTAL_SETTINGS, settings);
if (result < 0)