summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/group_ldap.php
diff options
context:
space:
mode:
authoralexweirig <alex.weirig@technolink.lu>2016-01-29 08:27:59 +0100
committerArthur Schiwon <blizzz@owncloud.com>2016-02-03 21:50:27 +0100
commitf4d4bed10ba2fd1465d54ab6a185fd2ac07d2879 (patch)
treee6a2aa1fedda98820fc73b0d1e3cabc589a08637 /apps/user_ldap/group_ldap.php
parent39aac2c66b2088153925cf75dca7f9f695571330 (diff)
downloadnextcloud-server-f4d4bed10ba2fd1465d54ab6a185fd2ac07d2879.tar.gz
nextcloud-server-f4d4bed10ba2fd1465d54ab6a185fd2ac07d2879.zip
Fixed undefined variable $dnGroup and variable name
I renamed $memberURL into $dynamicGroup and print that variable in the writeLog. I think this makes more sense.
Diffstat (limited to 'apps/user_ldap/group_ldap.php')
-rw-r--r--apps/user_ldap/group_ldap.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/user_ldap/group_ldap.php b/apps/user_ldap/group_ldap.php
index 2fcbcba08f4..33f848da7e7 100644
--- a/apps/user_ldap/group_ldap.php
+++ b/apps/user_ldap/group_ldap.php
@@ -457,13 +457,13 @@ class GROUP_LDAP extends BackendUtility implements \OCP\GroupInterface {
// look through dynamic groups to add them to the result array if needed
$groupsToMatch = $this->access->fetchListOfGroups(
$this->access->connection->ldapGroupFilter,array('dn',$dynamicGroupMemberURL));
- foreach($groupsToMatch as $memberUrl) {
- if (!array_key_exists($dynamicGroupMemberURL, $memberUrl)) {
+ foreach($groupsToMatch as $dynamicGroup) {
+ if (!array_key_exists($dynamicGroupMemberURL, $dynamicGroup)) {
continue;
}
- $pos = strpos($memberUrl[$dynamicGroupMemberURL][0], '(');
+ $pos = strpos($dynamicGroup[$dynamicGroupMemberURL][0], '(');
if ($pos !== false) {
- $memberUrlFilter = substr($memberUrl[$dynamicGroupMemberURL][0],$pos);
+ $memberUrlFilter = substr($dynamicGroup[$dynamicGroupMemberURL][0],$pos);
// apply filter via ldap search to see if this user is in this
// dynamic group
$userMatch = $this->access->readAttribute(
@@ -473,15 +473,15 @@ class GROUP_LDAP extends BackendUtility implements \OCP\GroupInterface {
);
if ($userMatch !== false) {
// match found so this user is in this group
- $pos = strpos($memberUrl['dn'][0], ',');
+ $pos = strpos($dynamicGroup['dn'][0], ',');
if ($pos !== false) {
- $membershipGroup = substr($memberUrl['dn'][0],3,$pos-3);
+ $membershipGroup = substr($dynamicGroup['dn'][0],3,$pos-3);
$groups[] = $membershipGroup;
}
}
} else {
\OCP\Util::writeLog('user_ldap', 'No search filter found on member url '.
- 'of group ' . $dnGroup, \OCP\Util::DEBUG);
+ 'of group ' . $dynamicGroup, \OCP\Util::DEBUG);
}
}
}