summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/lib
diff options
context:
space:
mode:
authorChristoph Wurst <ChristophWurst@users.noreply.github.com>2020-04-09 11:25:38 +0200
committerGitHub <noreply@github.com>2020-04-09 11:25:38 +0200
commit813bdc1ce8a45039fa17aac12bd078466a0034d0 (patch)
treea2ea40c4afc7f4c188d008d9850e795e60ae020d /apps/user_ldap/lib
parent21b7e510102514d85558b1863759c20171c15e28 (diff)
parent2fbad1ed72bc9ef591a6f35558eb02e7b76ffd1b (diff)
downloadnextcloud-server-813bdc1ce8a45039fa17aac12bd078466a0034d0.tar.gz
nextcloud-server-813bdc1ce8a45039fa17aac12bd078466a0034d0.zip
Merge pull request #20375 from nextcloud/techdebt/fix-array-indent-style
Fix (array) indent style to always use one tab
Diffstat (limited to 'apps/user_ldap/lib')
-rw-r--r--apps/user_ldap/lib/Command/CheckUser.php4
-rw-r--r--apps/user_ldap/lib/Command/DeleteConfig.php2
-rw-r--r--apps/user_ldap/lib/Command/Search.php8
-rw-r--r--apps/user_ldap/lib/Command/SetConfig.php6
-rw-r--r--apps/user_ldap/lib/Command/ShowConfig.php4
-rw-r--r--apps/user_ldap/lib/Command/TestConfig.php2
-rw-r--r--apps/user_ldap/lib/Connection.php6
-rw-r--r--apps/user_ldap/lib/Group_LDAP.php4
-rw-r--r--apps/user_ldap/lib/LDAPProvider.php4
-rw-r--r--apps/user_ldap/lib/User/User.php2
-rw-r--r--apps/user_ldap/lib/Wizard.php108
11 files changed, 75 insertions, 75 deletions
diff --git a/apps/user_ldap/lib/Command/CheckUser.php b/apps/user_ldap/lib/Command/CheckUser.php
index 5ec7c15e76a..5b837e47b8e 100644
--- a/apps/user_ldap/lib/Command/CheckUser.php
+++ b/apps/user_ldap/lib/Command/CheckUser.php
@@ -70,13 +70,13 @@ class CheckUser extends Command {
'ocName',
InputArgument::REQUIRED,
'the user name as used in Nextcloud'
- )
+ )
->addOption(
'force',
null,
InputOption::VALUE_NONE,
'ignores disabled LDAP configuration'
- )
+ )
->addOption(
'update',
null,
diff --git a/apps/user_ldap/lib/Command/DeleteConfig.php b/apps/user_ldap/lib/Command/DeleteConfig.php
index d53435ce7c5..7739580740f 100644
--- a/apps/user_ldap/lib/Command/DeleteConfig.php
+++ b/apps/user_ldap/lib/Command/DeleteConfig.php
@@ -52,7 +52,7 @@ class DeleteConfig extends Command {
'configID',
InputArgument::REQUIRED,
'the configuration ID'
- )
+ )
;
}
diff --git a/apps/user_ldap/lib/Command/Search.php b/apps/user_ldap/lib/Command/Search.php
index c061948fedd..edd4fa71ba0 100644
--- a/apps/user_ldap/lib/Command/Search.php
+++ b/apps/user_ldap/lib/Command/Search.php
@@ -59,27 +59,27 @@ class Search extends Command {
'search',
InputArgument::REQUIRED,
'the search string (can be empty)'
- )
+ )
->addOption(
'group',
null,
InputOption::VALUE_NONE,
'searches groups instead of users'
- )
+ )
->addOption(
'offset',
null,
InputOption::VALUE_REQUIRED,
'The offset of the result set. Needs to be a multiple of limit. defaults to 0.',
0
- )
+ )
->addOption(
'limit',
null,
InputOption::VALUE_REQUIRED,
'limit the results. 0 means no limit, defaults to 15',
15
- )
+ )
;
}
diff --git a/apps/user_ldap/lib/Command/SetConfig.php b/apps/user_ldap/lib/Command/SetConfig.php
index e74e9e33c18..a1ddf3a591a 100644
--- a/apps/user_ldap/lib/Command/SetConfig.php
+++ b/apps/user_ldap/lib/Command/SetConfig.php
@@ -45,17 +45,17 @@ class SetConfig extends Command {
'configID',
InputArgument::REQUIRED,
'the configuration ID'
- )
+ )
->addArgument(
'configKey',
InputArgument::REQUIRED,
'the configuration key'
- )
+ )
->addArgument(
'configValue',
InputArgument::REQUIRED,
'the new configuration value'
- )
+ )
;
}
diff --git a/apps/user_ldap/lib/Command/ShowConfig.php b/apps/user_ldap/lib/Command/ShowConfig.php
index 005798c7a05..f4af798d433 100644
--- a/apps/user_ldap/lib/Command/ShowConfig.php
+++ b/apps/user_ldap/lib/Command/ShowConfig.php
@@ -56,13 +56,13 @@ class ShowConfig extends Command {
'configID',
InputArgument::OPTIONAL,
'will show the configuration of the specified id'
- )
+ )
->addOption(
'show-password',
null,
InputOption::VALUE_NONE,
'show ldap bind password'
- )
+ )
;
}
diff --git a/apps/user_ldap/lib/Command/TestConfig.php b/apps/user_ldap/lib/Command/TestConfig.php
index 98dd25a1087..abab07d92f1 100644
--- a/apps/user_ldap/lib/Command/TestConfig.php
+++ b/apps/user_ldap/lib/Command/TestConfig.php
@@ -44,7 +44,7 @@ class TestConfig extends Command {
'configID',
InputArgument::REQUIRED,
'the configuration ID'
- )
+ )
;
}
diff --git a/apps/user_ldap/lib/Connection.php b/apps/user_ldap/lib/Connection.php
index 58afcf96726..14a0e19989a 100644
--- a/apps/user_ldap/lib/Connection.php
+++ b/apps/user_ldap/lib/Connection.php
@@ -365,7 +365,7 @@ class Connection extends LDAPUtility {
}
foreach(['ldapExpertUUIDUserAttr' => 'ldapUuidUserAttribute',
- 'ldapExpertUUIDGroupAttr' => 'ldapUuidGroupAttribute']
+ 'ldapExpertUUIDGroupAttr' => 'ldapUuidGroupAttribute']
as $expertSetting => $effectiveSetting) {
$uuidOverride = $this->configuration->$expertSetting;
if(!empty($uuidOverride)) {
@@ -394,7 +394,7 @@ class Connection extends LDAPUtility {
//make sure empty search attributes are saved as simple, empty array
$saKeys = ['ldapAttributesForUserSearch',
- 'ldapAttributesForGroupSearch'];
+ 'ldapAttributesForGroupSearch'];
foreach($saKeys as $key) {
$val = $this->configuration->$key;
if(is_array($val) && count($val) === 1 && empty($val[0])) {
@@ -423,7 +423,7 @@ class Connection extends LDAPUtility {
//options that shall not be empty
$options = ['ldapHost', 'ldapPort', 'ldapUserDisplayName',
- 'ldapGroupDisplayName', 'ldapLoginFilter'];
+ 'ldapGroupDisplayName', 'ldapLoginFilter'];
foreach($options as $key) {
$val = $this->configuration->$key;
if(empty($val)) {
diff --git a/apps/user_ldap/lib/Group_LDAP.php b/apps/user_ldap/lib/Group_LDAP.php
index 11fd0b462d9..a55a285dde3 100644
--- a/apps/user_ldap/lib/Group_LDAP.php
+++ b/apps/user_ldap/lib/Group_LDAP.php
@@ -707,8 +707,8 @@ class Group_LDAP extends BackendUtility implements \OCP\GroupInterface, IGroupLD
// memberof doesn't support memberuid, so skip it here.
if((int)$this->access->connection->hasMemberOfFilterSupport === 1
&& (int)$this->access->connection->useMemberOfToDetectMembership === 1
- && strtolower($this->access->connection->ldapGroupMemberAssocAttr) !== 'memberuid'
- ) {
+ && strtolower($this->access->connection->ldapGroupMemberAssocAttr) !== 'memberuid'
+ ) {
$groupDNs = $this->_getGroupDNsFromMemberOf($userDN);
if (is_array($groupDNs)) {
foreach ($groupDNs as $dn) {
diff --git a/apps/user_ldap/lib/LDAPProvider.php b/apps/user_ldap/lib/LDAPProvider.php
index 0547ffcffb6..31bf2531a96 100644
--- a/apps/user_ldap/lib/LDAPProvider.php
+++ b/apps/user_ldap/lib/LDAPProvider.php
@@ -65,7 +65,7 @@ class LDAPProvider implements ILDAPProvider, IDeletionFlagSupport {
$userBackendFound = true;
break;
}
- }
+ }
foreach ($serverContainer->getGroupManager()->getBackends() as $backend){
$this->logger->debug('instance '.get_class($backend).' group backend.', ['app' => 'user_ldap']);
if ($backend instanceof IGroupLDAP) {
@@ -75,7 +75,7 @@ class LDAPProvider implements ILDAPProvider, IDeletionFlagSupport {
}
}
- if (!$userBackendFound or !$groupBackendFound) {
+ if (!$userBackendFound or !$groupBackendFound) {
throw new \Exception('To use the LDAPProvider, user_ldap app must be enabled');
}
}
diff --git a/apps/user_ldap/lib/User/User.php b/apps/user_ldap/lib/User/User.php
index f092f44e041..ccd40621704 100644
--- a/apps/user_ldap/lib/User/User.php
+++ b/apps/user_ldap/lib/User/User.php
@@ -329,7 +329,7 @@ class User {
//check for / at the beginning or pattern c:\ resp. c:/
if( '/' !== $path[0]
&& !(3 < strlen($path) && ctype_alpha($path[0])
- && $path[1] === ':' && ('\\' === $path[2] || '/' === $path[2]))
+ && $path[1] === ':' && ('\\' === $path[2] || '/' === $path[2]))
) {
$path = $this->config->getSystemValue('datadirectory',
\OC::$SERVERROOT.'/data' ) . '/' . $path;
diff --git a/apps/user_ldap/lib/Wizard.php b/apps/user_ldap/lib/Wizard.php
index 181a58c11bf..71000cf88c5 100644
--- a/apps/user_ldap/lib/Wizard.php
+++ b/apps/user_ldap/lib/Wizard.php
@@ -201,10 +201,10 @@ class Wizard extends LDAPUtility {
*/
public function countUsersWithAttribute($attr, $existsCheck = false) {
if(!$this->checkRequirements(['ldapHost',
- 'ldapPort',
- 'ldapBase',
- 'ldapUserFilter',
- ])) {
+ 'ldapPort',
+ 'ldapBase',
+ 'ldapUserFilter',
+ ])) {
return false;
}
@@ -226,10 +226,10 @@ class Wizard extends LDAPUtility {
*/
public function detectUserDisplayNameAttribute() {
if(!$this->checkRequirements(['ldapHost',
- 'ldapPort',
- 'ldapBase',
- 'ldapUserFilter',
- ])) {
+ 'ldapPort',
+ 'ldapBase',
+ 'ldapUserFilter',
+ ])) {
return false;
}
@@ -268,10 +268,10 @@ class Wizard extends LDAPUtility {
*/
public function detectEmailAttribute() {
if(!$this->checkRequirements(['ldapHost',
- 'ldapPort',
- 'ldapBase',
- 'ldapUserFilter',
- ])) {
+ 'ldapPort',
+ 'ldapBase',
+ 'ldapUserFilter',
+ ])) {
return false;
}
@@ -315,10 +315,10 @@ class Wizard extends LDAPUtility {
*/
public function determineAttributes() {
if(!$this->checkRequirements(['ldapHost',
- 'ldapPort',
- 'ldapBase',
- 'ldapUserFilter',
- ])) {
+ 'ldapPort',
+ 'ldapBase',
+ 'ldapUserFilter',
+ ])) {
return false;
}
@@ -344,10 +344,10 @@ class Wizard extends LDAPUtility {
*/
private function getUserAttributes() {
if(!$this->checkRequirements(['ldapHost',
- 'ldapPort',
- 'ldapBase',
- 'ldapUserFilter',
- ])) {
+ 'ldapPort',
+ 'ldapBase',
+ 'ldapUserFilter',
+ ])) {
return false;
}
$cr = $this->getConnection();
@@ -400,9 +400,9 @@ class Wizard extends LDAPUtility {
*/
private function determineGroups($dbKey, $confKey, $testMemberOf = true) {
if(!$this->checkRequirements(['ldapHost',
- 'ldapPort',
- 'ldapBase',
- ])) {
+ 'ldapPort',
+ 'ldapBase',
+ ])) {
return false;
}
$cr = $this->getConnection();
@@ -480,9 +480,9 @@ class Wizard extends LDAPUtility {
public function determineGroupMemberAssoc() {
if(!$this->checkRequirements(['ldapHost',
- 'ldapPort',
- 'ldapGroupFilter',
- ])) {
+ 'ldapPort',
+ 'ldapGroupFilter',
+ ])) {
return false;
}
$attribute = $this->detectGroupMemberAssoc();
@@ -502,9 +502,9 @@ class Wizard extends LDAPUtility {
*/
public function determineGroupObjectClasses() {
if(!$this->checkRequirements(['ldapHost',
- 'ldapPort',
- 'ldapBase',
- ])) {
+ 'ldapPort',
+ 'ldapBase',
+ ])) {
return false;
}
$cr = $this->getConnection();
@@ -529,9 +529,9 @@ class Wizard extends LDAPUtility {
*/
public function determineUserObjectClasses() {
if(!$this->checkRequirements(['ldapHost',
- 'ldapPort',
- 'ldapBase',
- ])) {
+ 'ldapPort',
+ 'ldapBase',
+ ])) {
return false;
}
$cr = $this->getConnection();
@@ -540,7 +540,7 @@ class Wizard extends LDAPUtility {
}
$obclasses = ['inetOrgPerson', 'person', 'organizationalPerson',
- 'user', 'posixAccount', '*'];
+ 'user', 'posixAccount', '*'];
$filter = $this->configuration->ldapUserFilter;
//if filter is empty, it is probably the first time the wizard is called
//then, apply suggestions.
@@ -559,9 +559,9 @@ class Wizard extends LDAPUtility {
*/
public function getGroupFilter() {
if(!$this->checkRequirements(['ldapHost',
- 'ldapPort',
- 'ldapBase',
- ])) {
+ 'ldapPort',
+ 'ldapBase',
+ ])) {
return false;
}
//make sure the use display name is set
@@ -583,9 +583,9 @@ class Wizard extends LDAPUtility {
*/
public function getUserListFilter() {
if(!$this->checkRequirements(['ldapHost',
- 'ldapPort',
- 'ldapBase',
- ])) {
+ 'ldapPort',
+ 'ldapBase',
+ ])) {
return false;
}
//make sure the use display name is set
@@ -609,10 +609,10 @@ class Wizard extends LDAPUtility {
*/
public function getUserLoginFilter() {
if(!$this->checkRequirements(['ldapHost',
- 'ldapPort',
- 'ldapBase',
- 'ldapUserFilter',
- ])) {
+ 'ldapPort',
+ 'ldapBase',
+ 'ldapUserFilter',
+ ])) {
return false;
}
@@ -666,7 +666,7 @@ class Wizard extends LDAPUtility {
*/
public function guessPortAndTLS() {
if(!$this->checkRequirements(['ldapHost',
- ])) {
+ ])) {
return false;
}
$this->checkHost();
@@ -719,8 +719,8 @@ class Wizard extends LDAPUtility {
*/
public function guessBaseDN() {
if(!$this->checkRequirements(['ldapHost',
- 'ldapPort',
- ])) {
+ 'ldapPort',
+ ])) {
return false;
}
@@ -1318,13 +1318,13 @@ class Wizard extends LDAPUtility {
*/
private function getDefaultLdapPortSettings() {
static $settings = [
- ['port' => 7636, 'tls' => false],
- ['port' => 636, 'tls' => false],
- ['port' => 7389, 'tls' => true],
- ['port' => 389, 'tls' => true],
- ['port' => 7389, 'tls' => false],
- ['port' => 389, 'tls' => false],
- ];
+ ['port' => 7636, 'tls' => false],
+ ['port' => 636, 'tls' => false],
+ ['port' => 7389, 'tls' => true],
+ ['port' => 389, 'tls' => true],
+ ['port' => 7389, 'tls' => false],
+ ['port' => 389, 'tls' => false],
+ ];
return $settings;
}
@@ -1352,7 +1352,7 @@ class Wizard extends LDAPUtility {
//default ports
$portSettings = array_merge($portSettings,
- $this->getDefaultLdapPortSettings());
+ $this->getDefaultLdapPortSettings());
return $portSettings;
}