Example #1
0
        public ActionResult Profile(Models.User _user)
        {
            if (!_user.IsPasswordValid())
            {
                ModelState.AddModelError("invalidPassword", "Въвели сте грешна парола.");
            }

            if (ModelState.IsValid)
            {
                _user.Save();
                return(RedirectToAction("Index", "Home"));
            }

            return(View(_user));
        }