public async Task<ActionResult> ChangePassword(UserListViewModel model)
        {
            if (ModelState.IsValid)
            {
                var user = await UserManager.FindByNameAsync(model.Email);
                if (user == null)
                {
                    ModelState.AddModelError("", "No user found.");
                    return View();
                }
                string resetToken = UserManager.GeneratePasswordResetToken(user.Id);
                IdentityResult result = await UserManager.ResetPasswordAsync(user.Id, resetToken, model.Password);
                if (result.Succeeded)
                {
                    Alert(EnumHelper.Alerts.Success, HIResources.Strings.Change_Success);
                    return RedirectToAction("Index", "Users");
                }
                else
                {
                    Alert(EnumHelper.Alerts.Error, HIResources.Strings.Change_Error);
                    AddErrors(result);
                    return View();
                }
            }

            // If we got this far, something failed, redisplay form
            Alert(EnumHelper.Alerts.Error, HIResources.Strings.Change_Error);
            return RedirectToAction("Index", "Users");
        }
        // GET: Users
        public ActionResult Index()
        {
            Mapper.CreateMap<ApplicationUser, UserViewModel>();
            IAccountProvider accountProvider = new AspNetAccountProvider(
                HttpContext.GetOwinContext().GetUserManager<ApplicationUserManager>(),
                HttpContext.GetOwinContext().Authentication);

            IUserService userService = UserTypeFactory.GetUserService(new UserServiceUoW(User.Identity.GetUserId(), accountProvider));
            IList<UserViewModel> listOfUsers = Mapper.Map<IList<ApplicationUser>, IList<UserViewModel>>(
                userService.GetUsers().ToList());
            UserListViewModel userListViewModel = new UserListViewModel
            {
                Users = listOfUsers
            };
            userService.UpdateUserTenants();
            return View(userListViewModel);
        }