diff --git a/oauth/LDAP/LDAP.php b/oauth/LDAP/LDAP.php index 3d13cfe..2481736 100755 --- a/oauth/LDAP/LDAP.php +++ b/oauth/LDAP/LDAP.php @@ -75,7 +75,7 @@ public function __construct($ldap_host, $ldap_port = 389, $ldap_version = 3, $ld * TRUE if the user is identified and can access to the LDAP server * and FALSE if it isn't */ - public function checkLogin($user, $password = null, $ldap_search_attribute, $ldap_filter = null, $ldap_base_dn, $ldap_bind_dn, $ldap_bind_pass) + public function checkLogin($user, $ldap_search_attribute, $ldap_base_dn, $ldap_bind_dn, $ldap_bind_pass, $password = null, $ldap_filter = null) { if (!is_string($user)) { throw new InvalidArgumentException('First argument to LDAP/checkLogin must be the username or email of a ldap user (string). Ex: jdupont or jdupont@company.com'); diff --git a/oauth/LDAP/LDAPInterface.php b/oauth/LDAP/LDAPInterface.php index 012d836..25ae66e 100755 --- a/oauth/LDAP/LDAPInterface.php +++ b/oauth/LDAP/LDAPInterface.php @@ -27,7 +27,7 @@ interface LDAPInterface * TRUE if the user is identified and can access to the LDAP server * and FALSE if it isn't */ - public function checkLogin($user, $password = null, $ldap_search_attribute, $ldap_filter = null, $ldap_base_dn, $ldap_bind_dn, $ldap_bind_pass); + public function checkLogin($user, $ldap_search_attribute, $ldap_base_dn, $ldap_bind_dn, $ldap_bind_pass, $password = null, $ldap_filter = null); /** * @param string @ldap_base_dn diff --git a/oauth/index.php b/oauth/index.php index 9a7e804..bcfb7c8 100644 --- a/oauth/index.php +++ b/oauth/index.php @@ -56,7 +56,7 @@ function messageShow($html_template, $message = 'No Msg') { // Check user credential on LDAP try{ - $authenticated = $ldap->checkLogin($user,$password,$ldap_search_attribute,$ldap_filter,$ldap_base_dn,$ldap_bind_dn,$ldap_bind_pass); + $authenticated = $ldap->checkLogin($user,$ldap_search_attribute,$ldap_base_dn,$ldap_bind_dn,$ldap_bind_pass,$password,$ldap_filter); } catch (Exception $e) {