password reset link changed in setup letter
This commit is contained in:
parent
f0812f7b2d
commit
afae6c4a6d
7 changed files with 44 additions and 29 deletions
|
@ -1858,18 +1858,23 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return SystemController.GetSystemSettingsInternal(SystemSettings.WEBDAV_PORTAL_SETTINGS, false);
|
||||
}
|
||||
|
||||
public static string GenerateUserPasswordResetLink(int itemId, int accountId, out Guid tokenGuid, string pincode = null)
|
||||
public static string GenerateUserPasswordResetLink(int itemId, int accountId, out Guid tokenGuid, string pincode = null, string resetUrl = null)
|
||||
{
|
||||
string passwordResetUrlFormat = string.IsNullOrEmpty(pincode) ? "account/password-reset/step-2" : "account/password-reset/step-final";
|
||||
|
||||
var settings = GetWebDavSystemSettings();
|
||||
tokenGuid = new Guid();
|
||||
|
||||
if (settings == null || !settings.GetValueOrDefault(SystemSettings.WEBDAV_PASSWORD_RESET_ENABLED_KEY, false) ||!settings.Contains("WebdavPortalUrl"))
|
||||
if (settings == null || !settings.GetValueOrDefault(SystemSettings.WEBDAV_PASSWORD_RESET_ENABLED_KEY, false) || !settings.Contains("WebdavPortalUrl"))
|
||||
{
|
||||
tokenGuid = new Guid();
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(resetUrl) == false)
|
||||
{
|
||||
return resetUrl;
|
||||
}
|
||||
|
||||
string passwordResetUrlFormat = string.IsNullOrEmpty(pincode) ? "account/password-reset/step-2" : "account/password-reset/step-final";
|
||||
|
||||
var webdavPortalUrl = new Uri(settings["WebdavPortalUrl"]);
|
||||
|
||||
var token = CreateAccessToken(itemId, accountId, AccessTokenTypes.PasswrodReset);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue