summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/controllers/Users.class.php2
-rw-r--r--src/lib/Database.class.php6
-rw-r--r--src/models/Auth.class.php5
3 files changed, 6 insertions, 7 deletions
diff --git a/src/controllers/Users.class.php b/src/controllers/Users.class.php
index 4a8f04c..dc89603 100644
--- a/src/controllers/Users.class.php
+++ b/src/controllers/Users.class.php
@@ -148,7 +148,7 @@ class Users extends Controller {
$this->new_user($routed, $vars);
} else {
$username = $vars['username'];
- $passowrd = $vars['password1'];
+ $password = $vars['password1'];
$uid = $db->addUser($username, $password);
if ($uid===false) {
$this->showView('users/500');
diff --git a/src/lib/Database.class.php b/src/lib/Database.class.php
index 07df993..a7c8b4b 100644
--- a/src/lib/Database.class.php
+++ b/src/lib/Database.class.php
@@ -164,9 +164,9 @@ class Database {
$table = $this->mysql_table('auth');
$s = $this->mysql_escape($status);
$query =
- "UPDATE $table * \n".
- "SET status=$s \n".
- "WHERE uid=$uid ;";
+ "UPDATE $table \n".
+ "SET status=$s \n".
+ "WHERE uid=$uid ;";
$q = $this->mysql_query($query);
return ($q?true:false);
}
diff --git a/src/models/Auth.class.php b/src/models/Auth.class.php
index 3aba0f3..f2c9120 100644
--- a/src/models/Auth.class.php
+++ b/src/models/Auth.class.php
@@ -46,11 +46,10 @@ class Auth {
return $type;
}
protected function setType($type) {
- $logged_in_uid = $this->db->isLoggedIn();
+ $logged_in_uid = Login::isLoggedIn();
$logged_in_obj = Auth::getObj($logged_in_uid);
- $is_admin = $logged_in_obj->isAdmin();
+ $is_admin = $logged_in_obj->isAdmin();
if (!$is_admin) return false;
-
return $this->db->setStatus($this->uid, $type);
}
public function isUser() {