diff options
author | deva <deva> | 2010-02-28 10:20:09 +0000 |
---|---|---|
committer | deva <deva> | 2010-02-28 10:20:09 +0000 |
commit | 8c69fd9b2e824114ee3cd0f6a7dcddc7e31d913c (patch) | |
tree | 5352520fe12cb1670d2d5f035483a172c467643b /utils/user.php | |
parent | 5fac941e3295d4a094795aaf2f0e05c542879465 (diff) |
Added users module. Made new password lineedit widget.
Diffstat (limited to 'utils/user.php')
-rw-r--r-- | utils/user.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/utils/user.php b/utils/user.php index f189987..916c89a 100644 --- a/utils/user.php +++ b/utils/user.php @@ -17,7 +17,7 @@ class User { return 1; } - if($password1 != $password2) { // Check if passowrds match. + if($password1 != $password2) { // Check if passwords match. echo "<p>Passwords do not match!</p>\n"; return 1; } @@ -52,11 +52,17 @@ class Users { private $file; private $users = array(); - public function add($user) { + public function add($user) + { $key = $user->userid; $this->users[$key] = $user; } - + + public function delete($user) + { + unset($this->users[$user]); + } + public function write() { $fp = fopen($this->file, "w"); |