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,
}
$cols = [
- 'login' => [
+ 'username' => [
'label' => 'login',
'value' => $user['name'],
'target' => NULL,
}
$cols[$col]['value'] = $val; # update form value
if (empty($cols[$col]['target'])) {
- $colwarn[$col] = "Kan niet worden aangepast.";
+ if (empty($cols[$col]['input'])) {
+ $colwarn[$col] = "Kan niet worden aangepast.";
+ }
continue;
}
if (file_put_contents($cols[$col]['target'], $val) === FALSE) {
foreach ($colconf['values'] as $tag => $val) {
printf(
"\n\t\t" .
- '<input type="hidden" name="tags[%1$s]" value="" />' .
- '<input type="checkbox" name="tags[%s]" value="1"%s%s /> %s',
- $tag,
+ '<input type="hidden" name="%1$s" value="" />' .
+ '<input type="checkbox" name="%s" value="1" id="%s"%s%s />' .
+ '<label for="%2$s"> %s</label>',
+ "tags[$tag]", "tag-$tag",
$val['value'] ? ' checked' : '',
isset($val['target']) ? '' : ' readonly',
ucfirst($tag)