protected function saveMember()
 {
     global $ilUser;
     $GLOBALS['ilCtrl']->saveParameter($this, 'member_id');
     $form = $this->initMemberForm();
     if ($form->checkInput()) {
         // save history
         include_once './Services/Membership/classes/class.ilObjectCustomUserFieldHistory.php';
         $history = new ilObjectCustomUserFieldHistory($this->getObjId(), (int) $_REQUEST['member_id']);
         $history->setEditingTime(new ilDateTime(time(), IL_CAL_UNIX));
         $history->setUpdateUser($ilUser->getId());
         $history->save();
         ilMemberAgreementGUI::saveCourseDefinedFields($form, $this->getObjId(), (int) $_REQUEST['member_id']);
         ilUtil::sendSuccess($this->lng->txt('settings_saved'), TRUE);
         $GLOBALS['ilCtrl']->returnToParent($this);
         return TRUE;
     }
     $form->setValuesByPost();
     ilUtil::sendFailure($this->lng->txt('err_check_input'));
     return $this->editMember($form);
 }
 /**
  * Save
  *
  * @access private
  * @param
  * 
  */
 private function save()
 {
     global $ilUser;
     $form = $this->initFormAgreement();
     // #14715 - checkInput() does not work for checkboxes
     if ($this->checkAgreement() && $form->checkInput()) {
         self::saveCourseDefinedFields($form, $this->obj_id);
         $this->getAgreement()->setAccepted(true);
         $this->getAgreement()->setAcceptanceTime(time());
         $this->getAgreement()->save();
         include_once './Services/Membership/classes/class.ilObjectCustomUserFieldHistory.php';
         $history = new ilObjectCustomUserFieldHistory($this->obj_id, $ilUser->getId());
         $history->setUpdateUser($ilUser->getId());
         $history->setEditingTime(new ilDateTime(time(), IL_CAL_UNIX));
         $history->save();
         $this->ctrl->returnToParent($this);
     } elseif (!$this->checkAgreement()) {
         ilUtil::sendFailure($this->lng->txt($this->type . '_agreement_required'));
         $form->setValuesByPost();
         $this->showAgreement($form);
         return false;
     } else {
         ilUtil::sendFailure($this->lng->txt('fill_out_all_required_fields'));
         $form->setValuesByPost();
         $this->showAgreement($form);
         return false;
     }
 }