public async Task <ActionResult> VerifyEmailResponse(string verifyToken)
        {
            var userId = User.Id;

            var result = await _appUserManager.ConfirmEmailAsync(userId, verifyToken);

            if (!result.Succeeded)
            {
                return(ErrorResult(HttpStatusCode.BadRequest, GetLocalizedString <AreaResources>("VerifyEmailResponseError")));
            }

            User.EmailConfirmed = true;

            await _signInManager.RefreshIdentity(User);

            return(RedirectToAction(nameof(VerifyEmail), new { status = AccountActionStatus.VerifyEmailResponseSuccess.ToLowerCaseString() }));
        }
        public async Task <ActionResult> Edit(ProfileEditViewModel model)
        {
            if (ModelState.IsValid)
            {
                model.Id = User.Id;

                var adminUser = BuildAdminUserEntity(model);

                await _userManager.UpdateProfileAsync(adminUser);

                await _signInManager.RefreshIdentity(User, reloadClaims : true);

                Feedback.AddMessage(FeedbackMessageType.Success, GetLocalizedString <AreaResources>("DefaultSuccessMessage"));

                return(RedirectToAction(nameof(Edit)));
            }

            var entity = await _userManager.FindByIdAsync(User.Id);

            model = BuildEditProfileViewModel(adminUser: entity, postedModel: model);

            return(View(model));
        }