summaryrefslogtreecommitdiff
path: root/forum/utils
diff options
context:
space:
mode:
Diffstat (limited to 'forum/utils')
-rw-r--r--forum/utils/users.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/forum/utils/users.php b/forum/utils/users.php
index 99aaffc..93cc23c 100644
--- a/forum/utils/users.php
+++ b/forum/utils/users.php
@@ -129,7 +129,13 @@ class Users {
public function Users($file)
{
$this->file = $file;
- $this->read();
+ if(file_exists($file)) $this->read();
+ else {
+ // Create default users.xml file.
+ $user = new User(true, 0, 0, "admin", "8456c0209aaa9ca04730a3160caf6e5e6b5ea389", "Administrator", "", "", 0);
+ $this->add($user);
+ $this->write();
+ }
}
}