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 +?>