React to aspnet/Mvc#3165
This commit is contained in:
parent
19641453f5
commit
477f4087dc
|
|
@ -91,7 +91,7 @@ namespace IdentitySample.Controllers
|
|||
if (result.Succeeded)
|
||||
{
|
||||
var code = await UserManager.GenerateEmailConfirmationTokenAsync(user);
|
||||
var callbackUrl = Url.Action("ConfirmEmail", "Account", new { userId = user.Id, code = code }, protocol: Context.Request.Scheme);
|
||||
var callbackUrl = Url.Action("ConfirmEmail", "Account", new { userId = user.Id, code = code }, protocol: HttpContext.Request.Scheme);
|
||||
await MessageServices.SendEmailAsync(model.Email, "Confirm your account",
|
||||
"Please confirm your account by clicking this link: <a href=\"" + callbackUrl + "\">link</a>");
|
||||
ViewBag.Link = callbackUrl;
|
||||
|
|
@ -250,7 +250,7 @@ namespace IdentitySample.Controllers
|
|||
}
|
||||
|
||||
var code = await UserManager.GeneratePasswordResetTokenAsync(user);
|
||||
var callbackUrl = Url.Action("ResetPassword", "Account", new { userId = user.Id, code = code }, protocol: Context.Request.Scheme);
|
||||
var callbackUrl = Url.Action("ResetPassword", "Account", new { userId = user.Id, code = code }, protocol: HttpContext.Request.Scheme);
|
||||
await MessageServices.SendEmailAsync(model.Email, "Reset Password",
|
||||
"Please reset your password by clicking here: <a href=\"" + callbackUrl + "\">link</a>");
|
||||
ViewBag.Link = callbackUrl;
|
||||
|
|
@ -424,7 +424,7 @@ namespace IdentitySample.Controllers
|
|||
|
||||
private async Task<ApplicationUser> GetCurrentUserAsync()
|
||||
{
|
||||
return await UserManager.FindByIdAsync(Context.User.GetUserId());
|
||||
return await UserManager.FindByIdAsync(HttpContext.User.GetUserId());
|
||||
}
|
||||
|
||||
private IActionResult RedirectToLocal(string returnUrl)
|
||||
|
|
|
|||
|
|
@ -370,7 +370,7 @@ namespace IdentitySample.Controllers
|
|||
|
||||
private async Task<ApplicationUser> GetCurrentUserAsync()
|
||||
{
|
||||
return await UserManager.FindByIdAsync(Context.User.GetUserId());
|
||||
return await UserManager.FindByIdAsync(HttpContext.User.GetUserId());
|
||||
}
|
||||
|
||||
private IActionResult RedirectToLocal(string returnUrl)
|
||||
|
|
|
|||
Loading…
Reference in New Issue