From 86deedb0cd7ceffc9bfdfb761d5c46fe4dd050bc Mon Sep 17 00:00:00 2001 From: Andy Blyler Date: Thu, 6 Mar 2003 04:36:27 +0000 Subject: [PATCH] clean up of ldap stuff git-svn-id: svn+ssh://repo.cacti.net/var/data/svnroot/cacti/trunk/cacti@633 860744bd-22fc-0310-8c96-e9fe5004b5ca --- auth_login.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/auth_login.php b/auth_login.php index b281aaae90..f605a08d03 100644 --- a/auth_login.php +++ b/auth_login.php @@ -91,9 +91,13 @@ case 'login': } /* --- end ldap section --- */ - $user = db_fetch_row("select * from user_auth where username='" . $_POST["username"] . "' and password = '" . md5($_POST["password"]) . "'"); + if ($ldap_auth) { + $user = db_fetch_row("select * from user_auth where username='" . $_POST["username"] . "' and full_name = 'ldap user'"); + } else { + $user = db_fetch_row("select * from user_auth where username='" . $_POST["username"] . "' and password = '" . md5($_POST["password"]) . "'"); + } - if (sizeof($user) || $ldap_auth) { + if (sizeof($user)) { /* --- GOOD username/password --- */ $denied_ips = db_fetch_assoc("select hostname,policy from user_auth_hosts where user_id=" . $user["id"] . " and policy='1'");