diff --git a/html/includes/authentication/ldap.inc.php b/html/includes/authentication/ldap.inc.php index 636eebe11..c091d4b2d 100644 --- a/html/includes/authentication/ldap.inc.php +++ b/html/includes/authentication/ldap.inc.php @@ -67,13 +67,13 @@ function user_exists($username) function get_userlevel($username) { # FIXME should come from LDAP - return dbFetchRow("SELECT `level` FROM `users` WHERE `username` = ?", array($username)); + return dbFetchCell("SELECT `level` FROM `users` WHERE `username` = ?", array($username)); } function get_userid($username) { # FIXME should come from LDAP - 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) diff --git a/html/includes/authentication/mysql.inc.php b/html/includes/authentication/mysql.inc.php index c0cac2cf2..7f39ec19b 100644 --- a/html/includes/authentication/mysql.inc.php +++ b/html/includes/authentication/mysql.inc.php @@ -26,14 +26,13 @@ function authenticate($username,$password) function passwordscanchange($username="") { - - /* * By default allow the password to be modified, unless the existing * user is explicitly prohibited to do so. */ - if (empty($username) || !user_exists($username)) { + if (empty($username) || !user_exists($username)) + { return 1; } else { return dbFetchCell("SELECT can_modify_passwd FROM users WHERE username = ?", array($username));