예제 #1
0
        public virtual async Task <ActionResult> ConfirmEmail(string userId, string code)
        {
            if (userId == null || code == null)
            {
                return(View("Error"));
            }
            var result = await CustomUser.ConfirmEmailAsync(userId, code);

            AuthenticationManager.SignOut(DefaultAuthenticationTypes.ApplicationCookie);

            if (result.Succeeded)
            {
                AuthenticationManager.SignOut(DefaultAuthenticationTypes.ApplicationCookie);
                return(RedirectToAction(Mvc.Account.Login()));
            }
            else
            {
                return(View("Error"));
            }
        }