public IActionResult ChangeFogPassword(string id, string pass, string cacpture)
        {
            JSEnvelope ret   = new JSEnvelope();
            var        model = new Model.RememberPasswordModel()
            {
                UserId = id
            };

            try
            {
                byte[] bb;
                string ds     = "";
                bool   capres = false;
                if (Request.HttpContext.Session.Keys.Contains("captcha"))
                {
                    Request.HttpContext.Session.TryGetValue("captcha", out bb);
                    ds = CoreLogic.GetString(bb);
                    if (cacpture == ds)
                    {
                        capres = true;
                    }
                }
                if (capres)
                {
                    var res = CoreLogic.securityManager.changePass(id, pass);
                    return(View("../Home/Login"));
                }
                else
                {
                    model.Message = "Ошибка! Неверно введены символы с картинки.";
                    return(View("../Home/ChangePassReq", model));
                }
            }
            catch (E24Exception e)
            {
                model.Message = "Ошибка! " + e.Message;
                return(View("../Home/ChangePassReq", model));
            }
            catch (Exception e)
            {
                model.Message = "Ошибка! " + e.Message;
                return(View("../Home/ChangePassReq", model));
            }
        }
 public IActionResult ChangePassReq(string id)
 {
     if (ModelState.IsValid)
     {
         var res = CoreLogic.securityManager.CheckRegistration(id);
         if (res)
         {
             //int usid = res.Item2.Id;
             //var bid = CoreLogic.ConvertVal(usid);
             //string sessid = HttpContext.Session.Id;
             //HttpContext.Session.Set("userInfo", bid);
             //ModelState.Clear();
             //return Redirect(Url.Content("~/"));
             //http://localhost:5000/api/home/ChangePassReq?id=44daa70f8df24922bfa1e5084b789f14
             var model = new Model.RememberPasswordModel()
             {
                 UserId = id
             };
             return(View(model));
         }
     }
     return(View("Login"));
 }