login/edit: allow setup form for missing users
[minimedit.git] / widget / login / edit.php
index 829631e875da16065cf069026ea26fbb4364d3da..22ad87856056039fd775062f4a2abca3361cce79 100644 (file)
@@ -8,7 +8,7 @@ if ($User->admin('user')
 and !empty($Place['user']) and $Place['user'] !== $User->login) {
        $username = strtolower($Place['user']);
        unset($user);
-       $user = new User("profile/$username");
+       $user = new User("profile/$username", FALSE);
 }
 
 require_once('edit.inc.php');
@@ -194,7 +194,7 @@ foreach ($cols as $col => &$colconf) {
        print "\t";
        printf('<li><label for="%s">%s:</label>', $col, ucfirst($colconf['label']));
        if (@$colconf['type'] == 'file' and isset($colconf['value'])) {
-               $target = $user['dir'] . '/' . $colconf['filename'];
+               $target = $user->dir . '/' . $colconf['filename'];
                printf('<a href="/%s"><img src="/thumb/%s/%s?%s" /></a><br />',
                        $target,
                        200, $target, filemtime($target)