Merge pull request #21491 from nextcloud/backport/21421/stable19
[stable19] getXbyY can still return false, e.g. when using ldap write support
This commit is contained in:
commit
8f35a66100
|
@ -123,8 +123,7 @@ abstract class AbstractMapping {
|
||||||
*/
|
*/
|
||||||
public function getDNByName($name) {
|
public function getDNByName($name) {
|
||||||
$dn = array_search($name, $this->cache);
|
$dn = array_search($name, $this->cache);
|
||||||
if ($dn === false) {
|
if ($dn === false && ($dn = $this->getXbyY('ldap_dn', 'owncloud_name', $name)) !== false) {
|
||||||
$dn = $this->getXbyY('ldap_dn', 'owncloud_name', $name);
|
|
||||||
$this->cache[$dn] = $name;
|
$this->cache[$dn] = $name;
|
||||||
}
|
}
|
||||||
return $dn;
|
return $dn;
|
||||||
|
|
Loading…
Reference in New Issue