Bladeren bron

Fixed Password Reset action not using passed in user.

master
Teknikode 4 maanden geleden
bovenliggende
commit
d47b5e5785
1 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. 2
    2
      Teknik/Areas/User/Controllers/UserController.cs

+ 2
- 2
Teknik/Areas/User/Controllers/UserController.cs Bestand weergeven

@@ -860,11 +860,11 @@ namespace Teknik.Areas.Users.Controllers
User user = UserHelper.GetUser(_dbContext, username);
if (user != null)
{
IdentityUserInfo userClaims = await IdentityHelper.GetIdentityUserInfo(_config, User.Identity.Name);
IdentityUserInfo userClaims = await IdentityHelper.GetIdentityUserInfo(_config, user.Username);
// If they have a recovery email, let's send a verification
if (!string.IsNullOrEmpty(userClaims.RecoveryEmail) && userClaims.RecoveryVerified.HasValue && userClaims.RecoveryVerified.Value)
{
string verifyCode = await IdentityHelper.GeneratePasswordResetToken(_config, User.Identity.Name);
string verifyCode = await IdentityHelper.GeneratePasswordResetToken(_config, user.Username);
string resetUrl = Url.SubRouteUrl("account", "User.VerifyResetPassword", new { Username = user.Username, Code = WebUtility.UrlEncode(verifyCode) });
UserHelper.SendResetPasswordVerification(_config, user.Username, userClaims.RecoveryEmail, resetUrl);
return Json(new { result = true });

Laden…
Annuleren
Opslaan