public void UpdateUserInfo(RequestCabinetView requestCabinetView, string userName) { var user = _userRepository.GetByEmail(userName); user.FirstName = requestCabinetView.FirstName; user.LastName = requestCabinetView.LastName; user.Email = requestCabinetView.Email; user.PhoneNumber = requestCabinetView.PhoneNumber; if (!string.IsNullOrEmpty(requestCabinetView.Password)) { //change password } _userRepository.Update(user); }
public ActionResult EditUserInfo(RequestCabinetView requestCabinetView) { _orderService.UpdateUserInfo(requestCabinetView, User.Identity.Name); return(RedirectToAction("Cabinet")); }