diff options
author | Roger Szabo <roger.szabo@web.de> | 2018-05-02 18:17:21 +0800 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2018-05-29 15:21:19 +0200 |
commit | 27fca0eebcb8ead071e2797b0afab6a9449b2ed9 (patch) | |
tree | 5f7bf6e52c6f58da06bf7f8f69e2a395de06a137 /apps/user_ldap/lib/User | |
parent | af2ecbbd5a81d8e1621ecda1784a99adb0fc43dd (diff) | |
download | nextcloud-server-27fca0eebcb8ead071e2797b0afab6a9449b2ed9.tar.gz nextcloud-server-27fca0eebcb8ead071e2797b0afab6a9449b2ed9.zip |
Fix "Invalid argument supplied for foreach()"
Signed-off-by: Roger Szabo <roger.szabo@web.de>
Diffstat (limited to 'apps/user_ldap/lib/User')
-rw-r--r-- | apps/user_ldap/lib/User/User.php | 4 |
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); } |