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); } } }
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); } } }
public function __construct($options = array()) { parent::__construct($options); $this->noview(); }
public function __construct($options = []) { parent::__construct($options); $this->JSONView(); }