Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change parameter order to prevent PHP 8.1 deprecation warning #98

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion oauth/LDAP/LDAP.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected]');
Expand Down
2 changes: 1 addition & 1 deletion oauth/LDAP/LDAPInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion oauth/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down