[Security] LdapUserProvider uidKey could be null
This commit is contained in:
parent
4ce5a1bbc0
commit
c77625988d
@ -35,8 +35,12 @@ class LdapUserProvider implements UserProviderInterface
|
||||
private $defaultSearch;
|
||||
private $passwordAttribute;
|
||||
|
||||
public function __construct(LdapInterface $ldap, string $baseDn, string $searchDn = null, string $searchPassword = null, array $defaultRoles = array(), string $uidKey = 'sAMAccountName', string $filter = '({uid_key}={username})', string $passwordAttribute = null)
|
||||
public function __construct(LdapInterface $ldap, string $baseDn, string $searchDn = null, string $searchPassword = null, array $defaultRoles = array(), ?string $uidKey = 'sAMAccountName', string $filter = '({uid_key}={username})', string $passwordAttribute = null)
|
||||
{
|
||||
if (null === $uidKey) {
|
||||
$uidKey = 'sAMAccountName';
|
||||
}
|
||||
|
||||
$this->ldap = $ldap;
|
||||
$this->baseDn = $baseDn;
|
||||
$this->searchDn = $searchDn;
|
||||
|
Reference in New Issue
Block a user