fix PHP Fatal Error stalling AD Sync: Declaration of Ads::connect($admin=false) must be compatible with Ldap::contect($admin=false, $reconnect=false)

This commit is contained in:
ralf 2024-08-20 09:24:49 +02:00
parent 01d3eeac77
commit 2469b8cc60
2 changed files with 8 additions and 6 deletions

View File

@ -150,15 +150,16 @@ class Ads extends Ldap
}
/**
* connect to LDAP server
* Connect to LDAP server
*
* @param boolean $admin =false true (re-)connect with admin not user credentials, eg. to modify accounts
* @param boolean $admin =false true: (re-)connect with admin not user credentials, eg. to modify accounts
* @param boolean $reconnect =false true: force a reconnect
*/
function connect($admin=false)
function connect($admin = false, $reconnect=false)
{
unset($admin); // not used, but required by function signature
$this->ds = $this->accounts_ads->ldap_connection();
$this->ds = $this->accounts_ads->ldap_connection($reconnect);
}
/**

View File

@ -400,9 +400,10 @@ class Ldap
protected bool $admin_connection;
/**
* connect to LDAP server
* Connect to LDAP server
*
* @param boolean $admin =false true (re-)connect with admin not user credentials, eg. to modify accounts
* @param boolean $admin =false true: (re-)connect with admin not user credentials, eg. to modify accounts
* @param boolean $reconnect =false true: force a reconnect
*/
function connect($admin = false, $reconnect=false)
{