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
|
@ -2564,7 +2564,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
}
|
||||
|
||||
public static string GetMailboxSetupInstructions(int itemId, int accountId, bool pmm, bool emailMode, bool signup)
|
||||
public static string GetMailboxSetupInstructions(int itemId, int accountId, bool pmm, bool emailMode, bool signup, string passwordResetUrl)
|
||||
{
|
||||
#region Demo Mode
|
||||
if (IsDemoMode)
|
||||
|
@ -2589,12 +2589,11 @@ namespace WebsitePanel.EnterpriseServer
|
|||
if (String.IsNullOrEmpty(body))
|
||||
return null;
|
||||
|
||||
string result = EvaluateMailboxTemplate(itemId, accountId, pmm, false, false, body);
|
||||
string result = EvaluateMailboxTemplate(itemId, accountId, pmm, false, false, body, passwordResetUrl);
|
||||
return user.HtmlMail ? result : result.Replace("\n", "<br/>");
|
||||
}
|
||||
|
||||
private static string EvaluateMailboxTemplate(int itemId, int accountId,
|
||||
bool pmm, bool emailMode, bool signup, string template)
|
||||
private static string EvaluateMailboxTemplate(int itemId, int accountId, bool pmm, bool emailMode, bool signup, string template, string passwordResetUrl)
|
||||
{
|
||||
Hashtable items = new Hashtable();
|
||||
|
||||
|
@ -2618,7 +2617,8 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
Guid token;
|
||||
|
||||
var passwordResetUrl = OrganizationController.GenerateUserPasswordResetLink(account.ItemId, account.AccountId,out token);
|
||||
passwordResetUrl = OrganizationController.GenerateUserPasswordResetLink(account.ItemId, account.AccountId, out token, string.Empty, passwordResetUrl);
|
||||
|
||||
if (!string.IsNullOrEmpty(passwordResetUrl))
|
||||
{
|
||||
items["PswResetUrl"] = passwordResetUrl;
|
||||
|
@ -2696,8 +2696,8 @@ namespace WebsitePanel.EnterpriseServer
|
|||
if (to == null)
|
||||
to = user.Email;
|
||||
|
||||
subject = EvaluateMailboxTemplate(itemId, accountId, false, true, signup, subject);
|
||||
body = EvaluateMailboxTemplate(itemId, accountId, false, true, signup, body);
|
||||
subject = EvaluateMailboxTemplate(itemId, accountId, false, true, signup, subject, string.Empty);
|
||||
body = EvaluateMailboxTemplate(itemId, accountId, false, true, signup, body, string.Empty);
|
||||
|
||||
// send message
|
||||
return MailHelper.SendMessage(from, to, cc, subject, body, priority, isHtml);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue