_user, $field, $default); } public function setUser($user) { $this->_user = $user; return $this; } protected function _getAutocompleteSelect($type = null) { $select = $this->_db->select(); $select->from($this->_getPair('User'), self::getAutocompleteColumns()); $select->where('User.`bought` = "y"'); $select->limit(10); if ('event' === $type) { $select->where('User.`status` = "active"'); if (($userId = $this->getUser('id'))) { $select->where('User.id != ?', $userId, Qs_Db::INT_TYPE); } } return $select; } }