Avoid spaces in user names

[TODO] fix identity config
This commit is contained in:
2019-07-21 17:35:41 +02:00
parent 7143c1feeb
commit 4013d7f248
7 changed files with 33 additions and 18 deletions

View File

@ -504,7 +504,10 @@ namespace Yavsc.Controllers
// For more information on how to enable account confirmation and password reset please visit http://go.microsoft.com/fwlink/?LinkID=532713
// Send an email with this link
var code = await _userManager.GeneratePasswordResetTokenAsync(user);
var callbackUrl = Url.Action("ResetPassword", "Account", new { userId = user.Id, code = code }, protocol: "https");
var callbackUrl = Url.Action("ResetPassword", "Account", new { userId = user.Id, code = code },
protocol: "https", host: Startup.Authority);
await _emailSender.SendEmailAsync(user.UserName, user.Email, _localizer["Reset Password"],
_localizer["Please reset your password by following this link:"] + " <" + callbackUrl + ">");
return View("ForgotPasswordConfirmation");