Пример #1
0
        public ActionResult RecuperarSenha(string userautenticationvalue, string novasenha, string confirmarsenha)
        {
            var user = new GlobaisEmailBLL().ValidaTrocaSenha(userautenticationvalue);

            if (user != null)
            {
                ViewBag.User = user;
                if (novasenha.Length < 5)
                {
                    ViewBag.Tipo = 3;
                }
                else
                {
                    if (novasenha != confirmarsenha)
                    {
                        ViewBag.Tipo = 4;
                    }
                    else
                    {
                        //new GlobaisUsuarioBLL().SenhaAlterar(user.usu_id, GerarChave.HashValue(novasenha), GerarChave.HashValue(novasenha));
                        ViewBag.Tipo = 5;
                    }
                }
            }
            else
            {
                Response.Redirect("~/Login");
            }

            return(View());
        }
Пример #2
0
        public ActionResult RecuperarSenha(string userautenticationvalue)
        {
            var user = new GlobaisEmailBLL().ValidaTrocaSenha(userautenticationvalue);

            if (user == null)
            {
                ViewBag.Tipo = 1;
            }
            else
            {
                ViewBag.Tipo = 2;
            }
            ViewBag.User = user;
            return(View());
        }
Пример #3
0
        public JsonResult EsqueciSenhaEmail(string emailsenha)
        {
            var retorno = new GlobaisEmailBLL().EsqueciSenha(emailsenha);

            return(Json(retorno, JsonRequestBehavior.AllowGet));
        }