fix 2 factor authentication email
This commit is contained in:
parent
23597eb997
commit
420182b9bf
|
@ -346,13 +346,11 @@ namespace Oqtane.Managers
|
|||
user.TwoFactorExpiry = DateTime.UtcNow.AddMinutes(10);
|
||||
_users.UpdateUser(user);
|
||||
var alias = _tenantManager.GetAlias();
|
||||
string url = alias.Protocol + alias.Name;
|
||||
string siteName = _sites.GetSite(alias.SiteId).Name;
|
||||
string subject = _localizer["TwoFactorEmailSubject"];
|
||||
subject = subject.Replace("[SiteName]", siteName);
|
||||
string body = _localizer["TwoFactorEmailBody"].Value;
|
||||
body = body.Replace("[UserDisplayName]", user.DisplayName);
|
||||
body = body.Replace("[URL]", url);
|
||||
body = body.Replace("[SiteName]", siteName);
|
||||
body = body.Replace("[Token]", token);
|
||||
var notification = new Notification(alias.SiteId, user, subject, body);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
@ -118,7 +118,7 @@
|
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ForgotPasswordEmailBody" xml:space="preserve">
|
||||
<value>Dear [UserDisplayName]<br><br>You recently requested to reset your password. Please use the link below to complete the process: <b><a href="[URL]"><br><br>Click here to Reset Password</a></b><br><br>Please note that the link is only valid for 24 hours so if you are unable to take action within that time period, you should initiate another password reset on the site.<br><br>If you did not request to reset your password you can safely ignore this message.<br><br>Thank You!<br>[SiteName] team</value>
|
||||
<value>Dear [UserDisplayName]<br><br>You recently requested to reset your password. Please use the link below to complete the process: <b><a href="[URL]"><br><br>Click here to Reset Password</a></b><br><br>Please note that the link is only valid for 24 hours so if you are unable to take action within that time period, you should initiate another password reset on the site.<br><br>If you did not request to reset your password you can safely ignore this message.<br><br>Thank You!<br>[SiteName] Team</value>
|
||||
</data>
|
||||
<data name="ForgotPasswordEmailSubject" xml:space="preserve">
|
||||
<value>Password Reset Notification Sent For [SiteName]</value>
|
||||
|
@ -130,7 +130,7 @@
|
|||
<value>User Account Notification for [SiteName]</value>
|
||||
</data>
|
||||
<data name="TwoFactorEmailBody" xml:space="preserve">
|
||||
<value>Dear [UserDisplayName] + ",<br><br>You requested a secure verification code to log in to your account. Please enter the secure verification code on the site:<br><br><b>[Token] </b><br><br>Please note that the code is only valid for 10 minutes so if you are unable to take action within that time period, you should initiate a new login on the [Alias].<br><br>Thank You!<br>[SiteName] Team"</value>
|
||||
<value>Dear [UserDisplayName],<br><br>You requested a secure verification code to log in to your account. Please enter the secure verification code on the site:<br><br><b>[Token] </b><br><br>Please note that the code is only valid for 10 minutes so if you are unable to take action within that time period, you should initiate a new login on the site.<br><br>Thank You!<br>[SiteName] Team</value>
|
||||
</data>
|
||||
<data name="TwoFactorEmailSubject" xml:space="preserve">
|
||||
<value>User Verification Code for [SiteName]</value>
|
||||
|
|
Loading…
Reference in New Issue
Block a user