// GET: Dashboard/AccountUsers/Edit
        public ActionResult Edit()
        {
            membershipUser = Membership.GetUser(User.Identity.Name, true) as ToMembershipUser;

            EditAccountViewModel user = new EditAccountViewModel();
            user.ID = membershipUser.ID;
            user.FirstName = membershipUser.FirstName;
            user.LastName = membershipUser.LastName;
            user.Email = membershipUser.Email;
            user.CurrentPassword = null;
            user.NewPassword = null;
            user.ConfirmPassword = null;
            user.MediaID = membershipUser.MediaID;
            user.Media = membershipUser.Media;

            return View(user);
        }
 private void MapViewModel(AccountUser accountUser, EditAccountViewModel accountViewModel)
 {
     accountUser.ID = accountViewModel.ID;
     accountUser.FirstName = accountViewModel.FirstName;
     accountUser.LastName = accountViewModel.LastName;
     accountUser.Email = accountViewModel.Email;
     if(accountViewModel.NewPassword != null)
         accountUser.Password = SecurePasswordHasher.Hash(accountViewModel.NewPassword);
     accountUser.MediaID = accountViewModel.MediaID;
     accountUser.Media = accountViewModel.Media;
     accountUser.UpdatedAt = TimeStamp.Now();
 }