Exemplo n.º 1
0
        public ActionResult ResetPassword(string id)
        {
            if (string.IsNullOrEmpty(id))
            {
                return(RedirectToAction("Index", "Home"));
            }

            string userId = Encoding.Unicode.GetString(Convert.FromBase64String(id));
            var    user   = _userDbContext.GetById(int.Parse(userId));

            if (user == null)
            {
                return(RedirectToAction("Index", "Home"));
            }

            ViewBag.UserId = user.Id;
            return(View());
        }