protected bool _is_user_authorized(Communicate c)
        {
            Session session = Session.getInstance();
            int     status  = session.Status(c.sessID);

            //if(status == Session.SESSION_ACTIVE)
            //{
            if (session.get(c.sessID, "user") == "1")
            {
                return(true);
            }
            //}
            return(false);
        }
Beispiel #2
0
        protected void _init(Communicate c)
        {
            Session     session = Session.getInstance();
            ClientsInfo clients = ClientsInfo.getInstance();

            if (session.Status(c.sessID) == Session.SESSION_NONE)
            {
                c.sessID = session.Start(c.sessID);
                clients.AddClient(c.sessID, _client);
            }
            else
            {
                c.sessID = session.Start(c.sessID);
            }
        }