Ejemplo n.º 1
0
 public function __construct($options = array())
 {
     parent::__construct($options);
     $headers = getallheaders();
     if (isset($headers["X-Access-Token"])) {
         $type = strtolower($headers["X-App"]);
         $meta = Meta::first(array("property = ?" => "user", "meta_key = ?" => $type . "-app", "meta_value = ?" => $headers["X-Access-Token"]), array("property_id"));
         if ($meta) {
             $this->_appLogin($meta, $type);
         }
     }
 }
Ejemplo n.º 2
0
 public function __construct($options = array())
 {
     parent::__construct($options);
     $headers = getallheaders();
     if (isset($headers["X-Access-Token"])) {
         $type = $headers["X-App"];
         $meta = Meta::first(array("property = ?" => $type . "-app", "value = ?" => $headers["X-Access-Token"]), array("user_id"));
         if ($meta) {
             $user = User::first(array("id = ?" => $meta->user_id));
             $this->setUser($user);
         }
     }
 }
Ejemplo n.º 3
0
 public function __construct($options = array())
 {
     parent::__construct($options);
     $this->noview();
 }
Ejemplo n.º 4
0
 public function __construct($options = [])
 {
     parent::__construct($options);
     $this->JSONView();
 }