summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-05-30 11:50:35 +0200
committerGitHub <noreply@github.com>2018-05-30 11:50:35 +0200
commit4c1f88efb16564798efbce62153a7eebc174a640 (patch)
tree1fa5c5c88d279ef5ff9aca7d16ed8cb7b5baebbc /apps/user_ldap/lib
parent3acfcc433a6ce727f0db0fbe7f67780747bc1354 (diff)
parent0b253172691b06646266c4440a8ff31db0b529a4 (diff)
downloadnextcloud-server-4c1f88efb16564798efbce62153a7eebc174a640.tar.gz
nextcloud-server-4c1f88efb16564798efbce62153a7eebc174a640.zip
Merge pull request #9654 from nextcloud/backport/9360/stable13
[stable13] Fix "Invalid argument supplied for foreach()"
Diffstat (limited to 'apps/user_ldap/lib')
-rw-r--r--apps/user_ldap/lib/User/User.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/user_ldap/lib/User/User.php b/apps/user_ldap/lib/User/User.php
index c93d2a77d80..bfba3a92bee 100644
--- a/apps/user_ldap/lib/User/User.php
+++ b/apps/user_ldap/lib/User/User.php
@@ -614,7 +614,7 @@ class User {
$uid = $params['uid'];
if(isset($uid) && $uid === $this->getUsername()) {
//retrieve relevant user attributes
- $result = $this->access->search('objectclass=*', $this->dn, ['pwdpolicysubentry', 'pwdgraceusetime', 'pwdreset', 'pwdchangedtime']);
+ $result = $this->access->search('objectclass=*', array($this->dn), ['pwdpolicysubentry', 'pwdgraceusetime', 'pwdreset', 'pwdchangedtime']);
if(array_key_exists('pwdpolicysubentry', $result[0])) {
$pwdPolicySubentry = $result[0]['pwdpolicysubentry'];
@@ -631,7 +631,7 @@ class User {
$cacheKey = 'ppolicyAttributes' . $ppolicyDN;
$result = $this->connection->getFromCache($cacheKey);
if(is_null($result)) {
- $result = $this->access->search('objectclass=*', $ppolicyDN, ['pwdgraceauthnlimit', 'pwdmaxage', 'pwdexpirewarning']);
+ $result = $this->access->search('objectclass=*', array($ppolicyDN), ['pwdgraceauthnlimit', 'pwdmaxage', 'pwdexpirewarning']);
$this->connection->writeToCache($cacheKey, $result);
}