summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/lib
diff options
context:
space:
mode:
authorRobin McCorkell <rmccorkell@karoshi.org.uk>2014-05-15 21:47:28 +0100
committerRobin McCorkell <rmccorkell@karoshi.org.uk>2014-05-16 22:23:36 +0100
commite7aebc5c32c783f75a26f6ebc8116886a8cb55cf (patch)
tree30896945eae58ba3121bb08cc609a1bd6637844c /apps/user_ldap/lib
parent5b1ffd761172aef168283b92eb8d45e3118620b2 (diff)
downloadnextcloud-server-e7aebc5c32c783f75a26f6ebc8116886a8cb55cf.tar.gz
nextcloud-server-e7aebc5c32c783f75a26f6ebc8116886a8cb55cf.zip
Fix whitespace issues
Diffstat (limited to 'apps/user_ldap/lib')
-rw-r--r--apps/user_ldap/lib/access.php10
-rw-r--r--apps/user_ldap/lib/connection.php2
-rw-r--r--apps/user_ldap/lib/jobs.php36
-rw-r--r--apps/user_ldap/lib/wizard.php4
4 files changed, 26 insertions, 26 deletions
diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php
index 957a7c2418f..441eb40489e 100644
--- a/apps/user_ldap/lib/access.php
+++ b/apps/user_ldap/lib/access.php
@@ -138,7 +138,7 @@ class Access extends LDAPUtility {
if(is_array($dn)) {
$result = array();
foreach($dn as $singleDN) {
- $result[] = $this->sanitizeDN($singleDN);
+ $result[] = $this->sanitizeDN($singleDN);
}
return $result;
}
@@ -897,7 +897,7 @@ class Access extends LDAPUtility {
$findings = array();
foreach($sr as $res) {
- $findings = array_merge($findings, $this->ldap->getEntries($cr , $res ));
+ $findings = array_merge($findings, $this->ldap->getEntries($cr , $res ));
}
$this->processPagedSearchStatus($sr, $filter, $base, $findings['count'],
@@ -1028,10 +1028,10 @@ class Access extends LDAPUtility {
private function combineFilter($filters, $operator) {
$combinedFilter = '('.$operator;
foreach($filters as $filter) {
- if(!empty($filter) && $filter[0] !== '(') {
+ if(!empty($filter) && $filter[0] !== '(') {
$filter = '('.$filter.')';
- }
- $combinedFilter.=$filter;
+ }
+ $combinedFilter.=$filter;
}
$combinedFilter.=')';
return $combinedFilter;
diff --git a/apps/user_ldap/lib/connection.php b/apps/user_ldap/lib/connection.php
index 7e2f8d1d957..3a900a6fce4 100644
--- a/apps/user_ldap/lib/connection.php
+++ b/apps/user_ldap/lib/connection.php
@@ -289,7 +289,7 @@ class Connection extends LDAPUtility {
private function doSoftValidation() {
//if User or Group Base are not set, take over Base DN setting
foreach(array('ldapBaseUsers', 'ldapBaseGroups') as $keyBase) {
- $val = $this->configuration->$keyBase;
+ $val = $this->configuration->$keyBase;
if(empty($val)) {
$obj = strpos('Users', $keyBase) !== false ? 'Users' : 'Groups';
\OCP\Util::writeLog('user_ldap',
diff --git a/apps/user_ldap/lib/jobs.php b/apps/user_ldap/lib/jobs.php
index 34977dd4480..19c041e4db4 100644
--- a/apps/user_ldap/lib/jobs.php
+++ b/apps/user_ldap/lib/jobs.php
@@ -80,26 +80,26 @@ class Jobs extends \OC\BackgroundJob\TimedJob {
');
foreach($groups as $group) {
//we assume, that self::$groupsFromDB has been retrieved already
- $knownUsers = unserialize(self::$groupsFromDB[$group]['owncloudusers']);
- $actualUsers = self::getGroupBE()->usersInGroup($group);
- $hasChanged = false;
- foreach(array_diff($knownUsers, $actualUsers) as $removedUser) {
- \OCP\Util::emitHook('OC_User', 'post_removeFromGroup', array('uid' => $removedUser, 'gid' => $group));
- \OCP\Util::writeLog('user_ldap',
+ $knownUsers = unserialize(self::$groupsFromDB[$group]['owncloudusers']);
+ $actualUsers = self::getGroupBE()->usersInGroup($group);
+ $hasChanged = false;
+ foreach(array_diff($knownUsers, $actualUsers) as $removedUser) {
+ \OCP\Util::emitHook('OC_User', 'post_removeFromGroup', array('uid' => $removedUser, 'gid' => $group));
+ \OCP\Util::writeLog('user_ldap',
'bgJ "updateGroups" – "'.$removedUser.'" removed from "'.$group.'".',
\OCP\Util::INFO);
- $hasChanged = true;
- }
- foreach(array_diff($actualUsers, $knownUsers) as $addedUser) {
- \OCP\Util::emitHook('OC_User', 'post_addToGroup', array('uid' => $addedUser, 'gid' => $group));
- \OCP\Util::writeLog('user_ldap',
+ $hasChanged = true;
+ }
+ foreach(array_diff($actualUsers, $knownUsers) as $addedUser) {
+ \OCP\Util::emitHook('OC_User', 'post_addToGroup', array('uid' => $addedUser, 'gid' => $group));
+ \OCP\Util::writeLog('user_ldap',
'bgJ "updateGroups" – "'.$addedUser.'" added to "'.$group.'".',
\OCP\Util::INFO);
- $hasChanged = true;
- }
- if($hasChanged) {
+ $hasChanged = true;
+ }
+ if($hasChanged) {
$query->execute(array(serialize($actualUsers), $group));
- }
+ }
}
\OCP\Util::writeLog('user_ldap',
'bgJ "updateGroups" – FINISHED dealing with known Groups.',
@@ -121,7 +121,7 @@ class Jobs extends \OC\BackgroundJob\TimedJob {
'bgJ "updateGroups" – new group "'.$createdGroup.'" found.',
\OCP\Util::INFO);
$users = serialize(self::getGroupBE()->usersInGroup($createdGroup));
- $query->execute(array($createdGroup, $users));
+ $query->execute(array($createdGroup, $users));
}
\OCP\Util::writeLog('user_ldap',
'bgJ "updateGroups" – FINISHED dealing with created Groups.',
@@ -142,7 +142,7 @@ class Jobs extends \OC\BackgroundJob\TimedJob {
\OCP\Util::writeLog('user_ldap',
'bgJ "updateGroups" – group "'.$removedGroup.'" was removed.',
\OCP\Util::INFO);
- $query->execute(array($removedGroup));
+ $query->execute(array($removedGroup));
}
\OCP\Util::writeLog('user_ldap',
'bgJ "updateGroups" – FINISHED dealing with removed groups.',
@@ -184,7 +184,7 @@ class Jobs extends \OC\BackgroundJob\TimedJob {
$result = $query->execute()->fetchAll();
self::$groupsFromDB = array();
foreach($result as $dataset) {
- self::$groupsFromDB[$dataset['owncloudname']] = $dataset;
+ self::$groupsFromDB[$dataset['owncloudname']] = $dataset;
}
return self::$groupsFromDB;
diff --git a/apps/user_ldap/lib/wizard.php b/apps/user_ldap/lib/wizard.php
index 62dd138d7e3..d1f3f7bf3f1 100644
--- a/apps/user_ldap/lib/wizard.php
+++ b/apps/user_ldap/lib/wizard.php
@@ -641,7 +641,7 @@ class Wizard extends LDAPUtility {
//assuming only groups have their cn cached :)
continue;
}
- $filter = strtolower($filterPrefix . $dn . $filterSuffix);
+ $filter = strtolower($filterPrefix . $dn . $filterSuffix);
$rr = $this->ldap->search($cr, $base, $filter, array('dn'));
if(!$this->ldap->isResource($rr)) {
continue;
@@ -776,7 +776,7 @@ class Wizard extends LDAPUtility {
if(is_array($attrsToFilter) && count($attrsToFilter) > 0) {
$filterAttributes = '(|';
foreach($attrsToFilter as $attribute) {
- $filterAttributes .= '(' . $attribute . $loginpart . ')';
+ $filterAttributes .= '(' . $attribute . $loginpart . ')';
}
$filterAttributes .= ')';
$parts++;