summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/lib/User
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2020-03-18 17:40:23 +0100
committerArthur Schiwon <blizzz@arthur-schiwon.de>2020-04-14 12:58:28 +0200
commit84619a5b9c58ec7f4e3d7faea8c60a187cb61243 (patch)
tree2572e5f939f8c6bd76b4611c432aad3721b0b62e /apps/user_ldap/lib/User
parente4d378d01e67c41fa64a12662128ba25a0b27133 (diff)
downloadnextcloud-server-84619a5b9c58ec7f4e3d7faea8c60a187cb61243.tar.gz
nextcloud-server-84619a5b9c58ec7f4e3d7faea8c60a187cb61243.zip
use serverControls directly with LDAP calls, fixes 19127
- adapters for PHP API version to Support PHP < 7.3 - switch to pass only one base per search - cookie logic is moved from Access to API adapters Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/user_ldap/lib/User')
-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 7d4e6c267de..4ec7b27017b 100644
--- a/apps/user_ldap/lib/User/User.php
+++ b/apps/user_ldap/lib/User/User.php
@@ -711,7 +711,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=*', $this->dn, ['pwdpolicysubentry', 'pwdgraceusetime', 'pwdreset', 'pwdchangedtime']);
if (array_key_exists('pwdpolicysubentry', $result[0])) {
$pwdPolicySubentry = $result[0]['pwdpolicysubentry'];
@@ -728,7 +728,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=*', $ppolicyDN, ['pwdgraceauthnlimit', 'pwdmaxage', 'pwdexpirewarning']);
$this->connection->writeToCache($cacheKey, $result);
}