/** * __construct * * @access public * @return void */ public function __construct() { parent::__construct(); if (!is_null($this->db)) { $this->user = Framework_User::singleton(); } $this->session = Framework_Session::singleton(); }
/** * __construct * * @author Joe Stump <*****@*****.**> * @access public * @return void */ public function __construct($userID = null) { parent::__construct(); if (is_null($userID)) { $session = Framework_Session::singleton(); $userID = $session->{Framework::$site->config->user->userField}; if (is_null($userID)) { $userID = (string) Framework::$site->config->user->defaultUser; } else { $userID = $session->{(string) Framework::$site->config->user->userField}; } } $sql = "SELECT *\n FROM " . Framework::$site->config->user->userTable . "\n WHERE " . Framework::$site->config->user->userField . "='" . $userID . "'"; $result = $this->db->getRow($sql); if (!PEAR::isError($result) && is_array($result)) { $this->data = $result; } else { throw new Framework_Exception('Could not look up userID'); } }
/** * __construct * * @author Joe Stump <*****@*****.**> * @access public * @return void */ public function __construct($userID = null) { parent::__construct(); $this->getUserData($userID); }
/** * __construct * * @access public * @return void */ public function __construct() { parent::__construct(); $this->user = Framework_User::singleton(); $this->session = Framework_Session::singleton(); }