Update existing LDAP instance configuration instead of replacing it. Caching was not enabled as per the configuration, so this fixes this.

This commit is contained in:
2025-04-26 21:31:00 +10:00
parent 808934ebfe
commit 3604f1498c
4 changed files with 7 additions and 30 deletions

View File

@@ -1,21 +0,0 @@
<?php
namespace App\Ldap;
use LdapRecord\Configuration\DomainConfiguration;
use LdapRecord\Connection as ConnectionBase;
use LdapRecord\LdapInterface;
class Connection extends ConnectionBase
{
public function __construct(DomainConfiguration|array $config=[],?LdapInterface $ldap=NULL)
{
parent::__construct($config,$ldap);
// We need to override this so that we use our own Guard, that stores the users credentials in the session
$this->authGuardResolver = function () {
return new Guard($this->ldap, $this->configuration);
};
}
}