/** * Reimplement the store method to return the last inserted ID * * @return mixed When a new record was succesfully inserted, return the ID, otherwise the status */ public function store($updateNulls = false) { $isNew = $this->tsmart_userfield_id == 0; if (!parent::store($updateNulls)) { // Write data to the DB vmError($this->_db->getError()); return false; } else { return $this->tsmart_userfield_id; } }