Fixed email address in invite email

http://issues.umbraco.org/issue/U4-11002 - Corrected issue where email address was not linked correctly in the invite template
This commit is contained in:
Emmanuel Tissera
2018-02-22 16:30:41 +10:00
parent accf8ba5f2
commit e8e1cd8323
3 changed files with 6 additions and 6 deletions
@@ -1919,7 +1919,7 @@ To manage your website, simply open the Umbraco back office and start adding con
Hi %0%,
</h1>
<p style='color: #392F54; font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0 0 15px;'>
You have been invited by <a href="mailto:%1%" style="text-decoration: underline; color: #392F54; -ms-word-break: break-all; word-break: break-all;">%1%</a> to the Umbraco Back Office.
You have been invited by <a href="mailto:%4%" style="text-decoration: underline; color: #392F54; -ms-word-break: break-all; word-break: break-all;">%1%</a> to the Umbraco Back Office.
</p>
<p style='color: #392F54; font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0 0 15px;'>
Message from <a href="mailto:%1%" style="text-decoration: none; color: #392F54; -ms-word-break: break-all; word-break: break-all;">%1%</a>:
@@ -1912,7 +1912,7 @@ To manage your website, simply open the Umbraco back office and start adding con
Hi %0%,
</h1>
<p style='color: #392F54; font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0 0 15px;'>
You have been invited by <a href="mailto:%1%" style="text-decoration: underline; color: #392F54; -ms-word-break: break-all; word-break: break-all;">%1%</a> to the Umbraco Back Office.
You have been invited by <a href="mailto:%4%" style="text-decoration: underline; color: #392F54; -ms-word-break: break-all; word-break: break-all;">%1%</a> to the Umbraco Back Office.
</p>
<p style='color: #392F54; font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0 0 15px;'>
Message from <a href="mailto:%1%" style="text-decoration: none; color: #392F54; -ms-word-break: break-all; word-break: break-all;">%1%</a>:
+4 -4
View File
@@ -410,7 +410,7 @@ namespace Umbraco.Web.Editors
//send the email
await SendUserInviteEmailAsync(display, Security.CurrentUser.Name, user, userSave.Message);
await SendUserInviteEmailAsync(display, Security.CurrentUser.Name, Security.CurrentUser.Email, user, userSave.Message);
return display;
}
@@ -447,7 +447,7 @@ namespace Umbraco.Web.Editors
return attempt.Result;
}
private async Task SendUserInviteEmailAsync(UserBasic userDisplay, string from, IUser to, string message)
private async Task SendUserInviteEmailAsync(UserBasic userDisplay, string from, string fromEmail, IUser to, string message)
{
var token = await UserManager.GenerateEmailConfirmationTokenAsync((int)userDisplay.Id);
@@ -476,7 +476,7 @@ namespace Umbraco.Web.Editors
var emailBody = Services.TextService.Localize("user/inviteEmailCopyFormat",
//Ensure the culture of the found user is used for the email!
UserExtensions.GetUserCulture(to.Language, Services.TextService),
new[] { userDisplay.Name, from, message, inviteUri.ToString() });
new[] { userDisplay.Name, from, message, inviteUri.ToString(), fromEmail });
await UserManager.EmailService.SendAsync(
//send the special UmbracoEmailMessage which configures it's own sender
@@ -722,4 +722,4 @@ namespace Umbraco.Web.Editors
}
}
}
}