diff --git a/backend/AUTH/methode/ldap.php b/backend/AUTH/methode/ldap.php index a9ed72782..e0023ca2c 100755 --- a/backend/AUTH/methode/ldap.php +++ b/backend/AUTH/methode/ldap.php @@ -68,7 +68,13 @@ function verif_pw_ldap($login, $pw) { // login doesn't exist return ("BAD LOGIN OR PASSWORD"); } - return (ldap_test_pw($info[0]["dn"], $pw) ? "OK" : "BAD LOGIN OR PASSWORD"); + + $affich_method = get_affiche_methode(); + if($affich_method == 'SSO') { + return (isset($info[0]["dn"]) ? "OK" : "BAD LOGIN OR PASSWORD"); + } else { + return (ldap_test_pw($info[0]["dn"], $pw) ? "OK" : "BAD LOGIN OR PASSWORD"); + } } function search_on_loginnt($login) { diff --git a/backend/require/auth.manager.php b/backend/require/auth.manager.php index d6d57131d..8b1ddd67a 100644 --- a/backend/require/auth.manager.php +++ b/backend/require/auth.manager.php @@ -51,7 +51,10 @@ function get_list_methode($identity = false){ ); case 4: - + return array( + 0 => "ldap.php" + ); + break; case 5: if($identity){ return array(