summaryrefslogtreecommitdiff
path: root/utils/user.php
diff options
context:
space:
mode:
Diffstat (limited to 'utils/user.php')
-rw-r--r--utils/user.php12
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");