Exemplo n.º 1
0
        public async Task <ApplicationUserViewModel> ConfirmEmail(string userId, string code)
        {
            if (userId == null || code == null)
            {
                return(null);
            }

            ApplicationUserViewModel user = await _applicationUserService.FindUserByIdAsync(userId);

            IdentityResult result = await _applicationUserService.ConfirmEmail(user, code);

            if (result.Succeeded)
            {
                return(user);
            }

            return(null);
        }