public ProfileViewModel()
 {
     Heights = new List<Height>();
     Occupations = new List<Occupation>();
     UserProfile = new UserProfileModel();
     Requests = new List<Request>();
 }
 public ActionResult Register(UserProfileModel user)
 {
     user.IsVerified = "false";
     user.Age = DateTime.Now.Subtract(user.DateOfBirth).Days/365;
     ViewBag.UserExists = !_entityUser.AddNew(user.MapClientToServer());
     
     return View("Register");
 }
 public ActionResult Login(UserProfileModel user)
 {
     
     var temp = _entityUser.GetUser(user.Email);
     if (_entityUser.IsUser(user.MapClientToServer()))
     {
         Session["user"] = temp.MapServerToClient();
         Session.Timeout = 30;
     }
         
     else
     {
         ViewBag.isUser = false;
         return View();
     }
     
     return RedirectToAction("Index", "Home");
 }