From d7d7d67fa072edbec464497f3563c795e05f3bd0 Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Thu, 12 May 2011 23:17:44 +0000 Subject: [PATCH] fixes git-svn-id: http://www.observium.org/svn/observer/trunk@2294 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/includes/authentication/mysql.inc.php | 7 ++++--- html/index.php | 1 + html/pages/edituser.inc.php | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/html/includes/authentication/mysql.inc.php b/html/includes/authentication/mysql.inc.php index 32f1fd16d..b86e092b8 100644 --- a/html/includes/authentication/mysql.inc.php +++ b/html/includes/authentication/mysql.inc.php @@ -85,17 +85,17 @@ function adduser($username, $password, $level, $email = "", $realname = "", $can function user_exists($username) { - return @dbFetchCell("SELECT * FROM users WHERE username = ?", array($username)); + return @dbFetchCell("SELECT COUNT(*) FROM users WHERE username = ?", array($username)); } function get_userlevel($username) { - return dbFetchRow("SELECT `level` FROM `users` WHERE `username` = ?", array($username)); + return dbFetchCell("SELECT `level` FROM `users` WHERE `username` = ?", array($username)); } function get_userid($username) { - return dbFetchRow("SELECT `user_id` FROM `users` WHERE `username` = ?", array($username)); + return dbFetchCell("SELECT `user_id` FROM `users` WHERE `username` = ?", array($username)); } function deluser($username) @@ -103,4 +103,5 @@ function deluser($username) return dbDelete('users', "`username` = ?", array($username)); } + ?> diff --git a/html/index.php b/html/index.php index 57f2bcec7..7fa1d4a8d 100755 --- a/html/index.php +++ b/html/index.php @@ -1,4 +1,5 @@ "); -?> \ No newline at end of file +?>