-$cols = [
- 'login' => [
- 'label' => 'login',
- 'value' => $user['name'],
- 'target' => NULL,
- 'pattern' => "[a-z0-9-]+",
- ],
-] + $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',
- 'input' => <<<'EOT'
- <input type="password" name="oldpass" value="" placeholder="Huidig wachtwoord" />
- <input type="password" id="newpass" name="newpass" value="" placeholder="Nieuw wachtwoord" />
- <input type="password" name="passconf" value="" placeholder="Nogmaals" />
-EOT
- ,
- 'hide' => 'pass',
- ];
-}
-