summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoger Szabo <roger.szabo@web.de>2018-05-02 18:17:21 +0800
committerRoger Szabo <roger.szabo@web.de>2018-05-02 18:17:21 +0800
commit856164e5782c747f2ead917ecc99b900cc486802 (patch)
treeaf61cae221f626c679caa564c6447ce31d17dce4
parentdfe6d65410ba2f8ae671a7f75764639533c8c068 (diff)
downloadnextcloud-server-856164e5782c747f2ead917ecc99b900cc486802.tar.gz
nextcloud-server-856164e5782c747f2ead917ecc99b900cc486802.zip
Fix "Invalid argument supplied for foreach()"
Signed-off-by: Roger Szabo <roger.szabo@web.de>
-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 eb4101ddc25..27578921450 100644
--- a/apps/user_ldap/lib/User/User.php
+++ b/apps/user_ldap/lib/User/User.php
@@ -617,7 +617,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'];
@@ -634,7 +634,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);
}