/** * making sure all variables ar mysql safe */ function load($id) { parent::load($id); if (function_exists('base64_unserialize')) { $this->submission = base64_unserialize($this->submission); } }
/** * custom load */ function load($role) { //set the query $query = "SELECT ID FROM " . $this->_tbl + " WHERE role = '" . $role . "'"; //set and run the query $this->_db->setQuery($query); $key = $this->_db->loadAssoc()->ID; if ($key) { parent::load($key); } else { parent::load($role); } $this->capabilities = base64_unserialize($this->capabilities); $this->getCapabilities(); }