Exemple #1
0
        public async Task <IActionResult> ConfirmEmail(string userid, string token)
        {
            ApplicationUser user = await UserManagerAgent.FindByIdAsync(userid).ConfigureAwait(false);

            IdentityResult result = await UserManagerAgent.ConfirmEmailAsync(user, token).ConfigureAwait(false);

            if (result.Succeeded)
            {
                Success(_localizer["EmailConfirmSuccess"], true);
                return(View("Login"));
            }
            else
            {
                Danger(_localizer["EmailConfirmFail"]);
                return(View("Register"));
            }
        }