Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

confirmation e-mail later

$
0
0

I have an MVC Core project in which the client admin wants to review people who register on the site before they are approved for different roles, etc. When the person registers, they see a page with this content: "Thank you for registering with us! An Administrator will authenticate your request and send you a confirming e-mail message soon." The following is code that I tried, but obviously it is for an immediate confirmation of an account. Any clues on how to accomplish what I need to do? In other words, I want the first e-mail notification to go to the client admin, not the new user.

if (result.Succeeded)
{
var code = await _userManager.GenerateEmailConfirmationTokenAsync(user);
var callbackUrl = Url.Action(nameof(ConfirmEmail), "Account", new { userId = user.Id, code = code }, protocol: HttpContext.Request.Scheme);
//await _emailSender.SendEmailAsync(model.Email, "Confirm your account", $"Please confirm your account by clicking this link: <a href='{callbackUrl}'>link</a>");
_logger.LogInformation(3, "User created a new account with password.");
return View(result.Succeeded ? "Welcome" : "Error");
}


Viewing all articles
Browse latest Browse all 9386

Trending Articles