예제 #1
0
        public async Task <IActionResult> OnPostSendVerificationEmailAsync()
        {
            if (!ModelState.IsValid)
            {
                return(Page());
            }

            await _manageProfileService.SendVerificationEmail(
                User,
                (string code, int userId) =>
                Url.Page(
                    "/Account/ConfirmEmail",
                    pageHandler: null,
                    values: new { userId, code },
                    protocol: Request.Scheme));

            StatusMessage = "Verification email sent. Please check your email.";
            return(RedirectToPage());
        }