diff options
author | Robin McCorkell <rmccorkell@karoshi.org.uk> | 2014-05-15 21:47:28 +0100 |
---|---|---|
committer | Robin McCorkell <rmccorkell@karoshi.org.uk> | 2014-05-16 22:23:36 +0100 |
commit | e7aebc5c32c783f75a26f6ebc8116886a8cb55cf (patch) | |
tree | 30896945eae58ba3121bb08cc609a1bd6637844c /apps/user_ldap/lib/jobs.php | |
parent | 5b1ffd761172aef168283b92eb8d45e3118620b2 (diff) | |
download | nextcloud-server-e7aebc5c32c783f75a26f6ebc8116886a8cb55cf.tar.gz nextcloud-server-e7aebc5c32c783f75a26f6ebc8116886a8cb55cf.zip |
Fix whitespace issues
Diffstat (limited to 'apps/user_ldap/lib/jobs.php')
-rw-r--r-- | apps/user_ldap/lib/jobs.php | 36 |
1 files changed, 18 insertions, 18 deletions
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; |