login/edit: allow setup form for missing users
[minimedit.git] / auth.inc.php
index a1ccedf50cf16ea328ac107e4c8ee8fd9326fa15..a792ef6838e13383a6b130facde423ad37a8c0d5 100644 (file)
@@ -3,9 +3,9 @@ date_default_timezone_set('Europe/Amsterdam');
 
 class User
 {
-       function __construct($dir)
+       function __construct($dir, $existing = TRUE)
        {
-               if (!file_exists($dir)) {
+               if (!file_exists($dir) and $existing) {
                        throw new Exception("Gebruiker niet gevonden in $dir");
                }
                $this->dir = $dir;