/** * getDefaultParams * * @return array */ protected function getDefaultParams() { $result = parent::getDefaultParams(); if ($this->isRegisterMode()) { // Do not pass the profile ID for new profiles unset($result['profile_id']); // Set the appropriate mode $result['mode'] = $this->getCurrentForm()->getRegisterMode(); } return $result; }