{
// default values
$optionName = $optionType = $validationPattern = $outputClass = $selectOptions = $enableOptions = $permissions = $options = '';
- $required = $editable = $visible = $searchable = $isDisabled = $askDuringRegistration = 0;
+ $editable = $visible = $isDisabled = 0;
$defaultValue = $showOrder = null;
// get values
if (isset($option['validationpattern'])) {
$validationPattern = $option['validationpattern'];
}
- if (isset($option['required'])) {
- $required = \intval($option['required']);
- }
- if (isset($option['askduringregistration'])) {
- $askDuringRegistration = \intval($option['askduringregistration']);
- }
if (isset($option['editable'])) {
$editable = \intval($option['editable']);
}
if (isset($option['visible'])) {
$visible = \intval($option['visible']);
}
- if (isset($option['searchable'])) {
- $searchable = \intval($option['searchable']);
- }
if (isset($option['showorder'])) {
$showOrder = \intval($option['showorder']);
}
'validationPattern' => $validationPattern,
'selectOptions' => $selectOptions,
'enableOptions' => $enableOptions,
- 'required' => $required,
- 'askDuringRegistration' => $askDuringRegistration,
'editable' => $editable,
'visible' => $visible,
'outputClass' => $outputClass,
- 'searchable' => $searchable,
'showOrder' => $showOrder,
'permissions' => $permissions,
'options' => $options,
'originIsSystem' => 1,
];
+ if (isset($option['required'])) {
+ $data['required'] = \intval($option['required']);
+ }
+ if (isset($option['askduringregistration'])) {
+ $data['askDuringRegistration'] = \intval($option['askduringregistration']);
+ }
+ if (isset($option['searchable'])) {
+ $data['searchable'] = \intval($option['searchable']);
+ }
+
// update option
if (!empty($result['optionID']) && $this->installation->getAction() == 'update') {
$userOption = new UserOption(null, $result);