From 8c69fd9b2e824114ee3cd0f6a7dcddc7e31d913c Mon Sep 17 00:00:00 2001 From: deva Date: Sun, 28 Feb 2010 10:20:09 +0000 Subject: Added users module. Made new password lineedit widget. --- utils/user.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'utils/user.php') 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 "

Passwords do not match!

\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"); -- cgit v1.2.3