],
] + $cols;
+$tagdir = 'profile/.tags';
+if (file_exists($tagdir)) {
+ $tags = [];
+ foreach (glob("$tagdir/*") as $tag) {
+ $tagname = pathinfo($tag, PATHINFO_BASENAME);
+ $target = "$tag/{$user['name']}";
+ $tags[$tagname] = file_exists($tagname);
+ }
+
+ if ($tags) {
+ $options = '';
+ foreach ($tags as $tag => $val) {
+ $options .= sprintf(
+ "\n\t\t" .
+ '<input type="hidden" name="tags[%1$s]" value="" />' .
+ '<input type="checkbox" name="tags[%s]" value="1"%s%s /> %s',
+ $tag,
+ $val ? ' checked' : '',
+ ' readonly',
+ ucfirst($tag)
+ );
+ }
+
+ $cols['tags'] = [
+ 'label' => 'groepen',
+ 'input' => $options,
+ ];
+ }
+}
+
if (isset($user['pass'])) {
$cols['newpass'] = [
'label' => 'wachtwoord',