mirror of
https://github.com/Cacti/cacti.git
synced 2026-12-05 22:54:19 +09:00
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:
1 parent
a83c9c0892
commit
86deedb0cd
1 file changed
+6
-2
+6
-2
@@ -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'");
|
||||
|
||||
Reference in new issue
Block a user