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
This commit is contained in:
Andy Blyler committed 2003-03-06 04:36:27 +00:00
1 parent a83c9c0892
commit 86deedb0cd
1 file changed
+6 -2
+6 -2
View File
@@ -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'");