diff options
author | deva <deva> | 2008-10-11 19:15:10 +0000 |
---|---|---|
committer | deva <deva> | 2008-10-11 19:15:10 +0000 |
commit | 770a98fa4989a29622215312697c517aaf3cdd59 (patch) | |
tree | 48afbb4c778d9191a1b48c839eb7c53dd28e93d1 /forum | |
parent | d9285643a9725ccce5fdbdfff3205a6aa074c459 (diff) |
Made users class create the default users.xml, when users.xml doesn't exist instead of createentities.
Diffstat (limited to 'forum')
-rw-r--r-- | forum/utils/users.php | 8 |
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(); + } } } |