/* * Returns the user id of the last user inserted by the billing system. Uses $this->username to know. * If it can not find anything on the DB, returns null. This function wraps get_id_from_username() * * @return int id */ function getCompUserId() { if (is_numeric($this->userId)) { return $this->userId; } if (!empty($this->username)) { return (int)get_id_from_username($this->username); } return false; }