mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 07:44:04 +02:00
LdapUserGroupBackend: Fix exception when searching for single chars
refs #10370
This commit is contained in:
parent
4341eef4b1
commit
ffcc2ed56b
@ -9,6 +9,7 @@ use Icinga\Application\Logger;
|
|||||||
use Icinga\Data\ConfigObject;
|
use Icinga\Data\ConfigObject;
|
||||||
use Icinga\Exception\ConfigurationError;
|
use Icinga\Exception\ConfigurationError;
|
||||||
use Icinga\Exception\ProgrammingError;
|
use Icinga\Exception\ProgrammingError;
|
||||||
|
use Icinga\Protocol\Ldap\LdapException;
|
||||||
use Icinga\Repository\LdapRepository;
|
use Icinga\Repository\LdapRepository;
|
||||||
use Icinga\Repository\RepositoryQuery;
|
use Icinga\Repository\RepositoryQuery;
|
||||||
use Icinga\User;
|
use Icinga\User;
|
||||||
@ -467,6 +468,7 @@ class LdapUserGroupBackend extends LdapRepository implements UserGroupBackendInt
|
|||||||
*/
|
*/
|
||||||
protected function persistUserName($name)
|
protected function persistUserName($name)
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
$userDn = $this->ds
|
$userDn = $this->ds
|
||||||
->select()
|
->select()
|
||||||
->from($this->userClass, array())
|
->from($this->userClass, array())
|
||||||
@ -486,6 +488,9 @@ class LdapUserGroupBackend extends LdapRepository implements UserGroupBackendInt
|
|||||||
if ($groupDn) {
|
if ($groupDn) {
|
||||||
return $groupDn;
|
return $groupDn;
|
||||||
}
|
}
|
||||||
|
} catch (LdapException $_) {
|
||||||
|
// pass
|
||||||
|
}
|
||||||
|
|
||||||
Logger::debug('Unable to persist uid or gid "%s" in repository "%s". No DN found.', $name, $this->getName());
|
Logger::debug('Unable to persist uid or gid "%s" in repository "%s". No DN found.', $name, $this->getName());
|
||||||
return $name;
|
return $name;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user