return;
}
-if (!empty($User['admin']) and $Page == 'login/edit' and $Args) {
- $username = strtolower(ltrim($Args, '/'));
+if (!empty($User['admin']) and !empty($Place['user'])) {
+ $username = strtolower($Place['user']);
+ unset($user);
$user = [
'dir' => "profile/$username",
'name' => $username,
'name' => [
'label' => 'volledige naam',
'explain' => "Alleen zichtbaar voor andere leden.",
+ 'filter' => ["\n", '; '],
+ 'size' => 30,
],
'email' => [
'label' => 'e-mailadres',
'type' => 'email',
'explain' => "Voor contact van of met deze site. Wij zullen dit nooit vrij- of doorgeven.",
+ 'size' => 30,
],
'avatar' => [
'label' => 'portretfoto',
'value' => $user['name'],
'target' => NULL,
'pattern' => "[a-z0-9-]+",
+ 'size' => 10,
],
] + $cols;
}
continue;
}
+
+ if (isset($cols[$col]['filter'])) {
+ list ($targetstr, $inputstr) = $cols[$col]['filter'];
+ $val = str_replace($inputstr, $targetstr, $val);
+ }
if (isset($cols[$col]['value']) and $cols[$col]['value'] === $val) {
continue; # unaltered
}
}
}
else {
+ if (isset($cols[$col]['filter'])) {
+ list ($targetstr, $inputstr) = $cols[$col]['filter'];
+ $colconf['value'] = str_replace($targetstr, $inputstr, $colconf['value']);
+ }
+
$attrs = [
'type' => @$colconf['type'] ?: 'text',
'name' => $col,
'placeholder' => "Niet ingesteld",
'readonly' => empty($colconf['target']),
'pattern' => @$colconf['pattern'] ?: FALSE,
+ 'size' => @$colconf['size'] ?: FALSE,
];
if (@$colconf['type'] == 'file') {
$attrs['accept'] = "image/jpeg";