mirror of
https://github.com/nextcloud/server.git
synced 2024-08-29 17:54:44 +02:00
Fix "Invalid argument supplied for foreach()"
Signed-off-by: Roger Szabo <roger.szabo@web.de>
This commit is contained in:
parent
dfe6d65410
commit
856164e578
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user