Esempio n. 1
0
        public static Usuario VerificaSeOUsuarioEstaLogado()
        {
            var Usuario = HttpContext.Current.Request.Cookies["UserCookieAuthentication"];

            if (Usuario == null)
            {
                return(null);
            }
            else
            {
                int IDUsuario = Convert.ToInt32(Criptografia.
                                                Descriptografar(Usuario.Values["IDUsuario"]));
                var UsuarioRetornado = UsuarioDTO.RecuperaUsuarioPorID(IDUsuario);
                return(UsuarioRetornado);
            }
        }