function putRecord(array $p_aData) { $iUserID = parent::putRecord($p_aData); $bEdit = isset($p_aData[$this->getPrimaryKey()]); $iInsertUserID = $bEdit ? $p_aData[$this->getPrimaryKey()] : $iUserID; // Add an audit trail $oAudit = new APP_Model_Audit(); // Make an insert into the audit log. // $oAudit->insert(array( //// '' // )); // } }
function insert(array $p_aRecord) { $p_aRecord['active'] = 1; return parent::insert($p_aRecord); }
/** * Check if the database has been installed */ function is_db_installed() { $config = PPI_Registry::getInstance()->get('config'); $oUser = new PPI_Model_User(); $rows = $oUser->query('SELECT ' . $config->system->defaultUserTable . ' FROM ' . $config->system->defaultUserTable . ' LIMIT 1'); return count($rows) > 0; }