summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/lib/User
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2022-03-03 16:35:06 +0100
committerCôme Chilliet <come.chilliet@nextcloud.com>2022-03-03 16:35:06 +0100
commitdab5ea958a58e79b7f40b49bbe3af8839dc9c9d1 (patch)
treeba32d3a96807f5f126ce7e2fcf82d1c0796ead43 /apps/user_ldap/lib/User
parent0c5bd588ed4528d46df244a686b6f91299766836 (diff)
downloadnextcloud-server-dab5ea958a58e79b7f40b49bbe3af8839dc9c9d1.tar.gz
nextcloud-server-dab5ea958a58e79b7f40b49bbe3af8839dc9c9d1.zip
Fix unit tests
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/user_ldap/lib/User')
-rw-r--r--apps/user_ldap/lib/User/User.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/user_ldap/lib/User/User.php b/apps/user_ldap/lib/User/User.php
index ab1500ff368..15894ce04b7 100644
--- a/apps/user_ldap/lib/User/User.php
+++ b/apps/user_ldap/lib/User/User.php
@@ -266,8 +266,8 @@ class User {
/**
* returns the home directory of the user if specified by LDAP settings
- * @param string $valueFromLDAP
- * @return bool|string
+ * @param ?string $valueFromLDAP
+ * @return false|string
* @throws \Exception
*/
public function getHomePath($valueFromLDAP = null) {
@@ -278,8 +278,7 @@ class User {
&& strpos($this->access->connection->homeFolderNamingRule, 'attr:') === 0
&& $this->access->connection->homeFolderNamingRule !== 'attr:') {
$attr = substr($this->access->connection->homeFolderNamingRule, strlen('attr:'));
- $homedir = $this->access->readAttribute(
- $this->access->username2dn($this->getUsername()), $attr);
+ $homedir = $this->access->readAttribute($this->access->username2dn($this->getUsername()), $attr);
if ($homedir && isset($homedir[0])) {
$path = $homedir[0];
}