+ if (isset($cols[$col]['values'])) {
+ $optwarn = [];
+ foreach ($val as $optcol => $optval) {
+ $option = &$cols[$col]['values'][$optcol];
+ if (!isset($option['target'])) {
+ $optok = FALSE; # forbidden
+ }
+ if ($option['value'] === !empty($optval)) {
+ continue; # unaltered
+ }
+ elseif (empty($optval)) {
+ $optok = @unlink($option['target']);
+ }
+ else {
+ # link option target to current user dir
+ $optok = @symlink("../../{$user['name']}", $option['target']);
+ }
+ $option['value'] = $optval; # update form value
+ if (!$optok) {
+ $optwarn[$optcol] = TRUE;
+ }
+ }
+ if ($optwarn) {
+ $colwarn[$col] = "Wijziging niet opgeslagen voor "
+ . implode(', ', array_keys($optwarn));
+ }
+ continue;
+ }