Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Wurst <ChristophWurst@users.noreply.github.com>2020-04-09 21:39:37 +0300
committerGitHub <noreply@github.com>2020-04-09 21:39:37 +0300
commit008e6d7e849a82fdc3aa20169c4c8bdd0fe506be (patch)
tree6abbe3d8741de956ad787b5e3d55cec85ceb558f /apps/user_ldap
parent64510932b8bd7d4d1d490f7da7fb9ebcf21e31c2 (diff)
parent3a415e4139d6e28c16b0420ab411e6df5ff6d54a (diff)
Merge pull request #20391 from nextcloud/refactor/spaces-cleanup
Remove all extra whitespace PSR2 does not like
Diffstat (limited to 'apps/user_ldap')
-rw-r--r--apps/user_ldap/lib/Access.php6
-rw-r--r--apps/user_ldap/lib/Configuration.php4
-rw-r--r--apps/user_ldap/lib/Controller/RenewPasswordController.php2
-rw-r--r--apps/user_ldap/lib/Helper.php2
-rw-r--r--apps/user_ldap/lib/LDAPProvider.php6
-rw-r--r--apps/user_ldap/lib/LDAPProviderFactory.php2
-rw-r--r--apps/user_ldap/lib/Migration/UUIDFixGroup.php2
-rw-r--r--apps/user_ldap/lib/User/Manager.php4
-rw-r--r--apps/user_ldap/lib/User/User.php6
-rw-r--r--apps/user_ldap/templates/settings.php2
-rw-r--r--apps/user_ldap/tests/GroupLDAPPluginTest.php4
-rw-r--r--apps/user_ldap/tests/Group_LDAPTest.php2
-rw-r--r--apps/user_ldap/tests/Integration/ExceptionOnLostConnection.php2
-rw-r--r--apps/user_ldap/tests/Jobs/CleanUpTest.php2
-rw-r--r--apps/user_ldap/tests/UserLDAPPluginTest.php8
15 files changed, 27 insertions, 27 deletions
diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php
index 81e467cb639..836e1fddb85 100644
--- a/apps/user_ldap/lib/Access.php
+++ b/apps/user_ldap/lib/Access.php
@@ -620,7 +620,7 @@ class Access extends LDAPUtility {
// outside of core user management will still cache the user as non-existing.
$originalTTL = $this->connection->ldapCacheTTL;
$this->connection->setConfiguration(['ldapCacheTTL' => 0]);
- if( $intName !== ''
+ if($intName !== ''
&& (($isUser && !$this->ncUserManager->userExists($intName))
|| (!$isUser && !\OC::$server->getGroupManager()->groupExists($intName))
)
@@ -708,7 +708,7 @@ class Access extends LDAPUtility {
foreach($ldapObjects as $ldapObject) {
$nameByLDAP = null;
- if( isset($ldapObject[$nameAttribute])
+ if(isset($ldapObject[$nameAttribute])
&& is_array($ldapObject[$nameAttribute])
&& isset($ldapObject[$nameAttribute][0])
) {
@@ -1777,7 +1777,7 @@ class Access extends LDAPUtility {
if($this->detectUuidAttribute($dn, $isUser, false, $ldapRecord)) {
$attr = $this->connection->$uuidAttr;
$uuid = isset($ldapRecord[$attr]) ? $ldapRecord[$attr] : $this->readAttribute($dn, $attr);
- if( !is_array($uuid)
+ if(!is_array($uuid)
&& $uuidOverride !== ''
&& $this->detectUuidAttribute($dn, $isUser, true, $ldapRecord))
{
diff --git a/apps/user_ldap/lib/Configuration.php b/apps/user_ldap/lib/Configuration.php
index a04ea638d09..3c6693b151e 100644
--- a/apps/user_ldap/lib/Configuration.php
+++ b/apps/user_ldap/lib/Configuration.php
@@ -311,7 +311,7 @@ class Configuration {
/**
* Sets multi-line values as arrays
- *
+ *
* @param string $varName name of config-key
* @param array|string $value to set
*/
@@ -387,7 +387,7 @@ class Configuration {
/**
* Sets a scalar value.
- *
+ *
* @param string $varName name of config key
* @param mixed $value to set
*/
diff --git a/apps/user_ldap/lib/Controller/RenewPasswordController.php b/apps/user_ldap/lib/Controller/RenewPasswordController.php
index ff60cd3b2f1..cc58f79cbd0 100644
--- a/apps/user_ldap/lib/Controller/RenewPasswordController.php
+++ b/apps/user_ldap/lib/Controller/RenewPasswordController.php
@@ -54,7 +54,7 @@ class RenewPasswordController extends Controller {
* @param IConfig $config
* @param IURLGenerator $urlGenerator
*/
- function __construct($appName, IRequest $request, IUserManager $userManager,
+ function __construct($appName, IRequest $request, IUserManager $userManager,
IConfig $config, IL10N $l10n, ISession $session, IURLGenerator $urlGenerator) {
parent::__construct($appName, $request);
$this->userManager = $userManager;
diff --git a/apps/user_ldap/lib/Helper.php b/apps/user_ldap/lib/Helper.php
index 93dc92f334d..595e3c92ec8 100644
--- a/apps/user_ldap/lib/Helper.php
+++ b/apps/user_ldap/lib/Helper.php
@@ -305,7 +305,7 @@ class Helper {
$userBackend = new User_Proxy(
$configPrefixes, $ldapWrapper, $ocConfig, $notificationManager, $userSession, $userPluginManager
);
- $uid = $userBackend->loginName2UserName($param['uid'] );
+ $uid = $userBackend->loginName2UserName($param['uid']);
if($uid !== false) {
$param['uid'] = $uid;
}
diff --git a/apps/user_ldap/lib/LDAPProvider.php b/apps/user_ldap/lib/LDAPProvider.php
index 1916e10b8cd..75267165cdf 100644
--- a/apps/user_ldap/lib/LDAPProvider.php
+++ b/apps/user_ldap/lib/LDAPProvider.php
@@ -110,11 +110,11 @@ class LDAPProvider implements ILDAPProvider, IDeletionFlagSupport {
if(!$result){
throw new \Exception('Translation to LDAP DN unsuccessful');
}
- return $result;
+ return $result;
}
/**
- * Translate a LDAP DN to an internal user name. If there is no mapping between
+ * Translate a LDAP DN to an internal user name. If there is no mapping between
* the DN and the user name, a new one will be created.
* @param string $dn LDAP DN
* @return string with the internal user name
@@ -147,7 +147,7 @@ class LDAPProvider implements ILDAPProvider, IDeletionFlagSupport {
}
/**
- * Return a new LDAP connection resource for the specified user.
+ * Return a new LDAP connection resource for the specified user.
* The connection must be closed manually.
* @param string $uid user id
* @return resource of the LDAP connection
diff --git a/apps/user_ldap/lib/LDAPProviderFactory.php b/apps/user_ldap/lib/LDAPProviderFactory.php
index 637b2d4e67b..ec8d0e3254e 100644
--- a/apps/user_ldap/lib/LDAPProviderFactory.php
+++ b/apps/user_ldap/lib/LDAPProviderFactory.php
@@ -56,7 +56,7 @@ class LDAPProviderFactory implements ILDAPProviderFactory {
$dbConnection = $this->serverContainer->getDatabaseConnection();
$userMapping = new UserMapping($dbConnection);
return new LDAPProvider($this->serverContainer, new Helper($this->serverContainer->getConfig()),
- new DeletedUsersIndex($this->serverContainer->getConfig(),
+ new DeletedUsersIndex($this->serverContainer->getConfig(),
$dbConnection, $userMapping));
}
}
diff --git a/apps/user_ldap/lib/Migration/UUIDFixGroup.php b/apps/user_ldap/lib/Migration/UUIDFixGroup.php
index 618e5c519e7..a101a97a82f 100644
--- a/apps/user_ldap/lib/Migration/UUIDFixGroup.php
+++ b/apps/user_ldap/lib/Migration/UUIDFixGroup.php
@@ -34,7 +34,7 @@ use OCP\IConfig;
class UUIDFixGroup extends UUIDFix {
public function __construct(GroupMapping $mapper, LDAP $ldap, IConfig $config, Helper $helper) {
$this->mapper = $mapper;
- $this->proxy = new User_Proxy($helper->getServerConfigurationPrefixes(true), $ldap, $config,
+ $this->proxy = new User_Proxy($helper->getServerConfigurationPrefixes(true), $ldap, $config,
\OC::$server->getNotificationManager(), \OC::$server->getUserSession(),
\OC::$server->query('LDAPUserPluginManager'));
}
diff --git a/apps/user_ldap/lib/User/Manager.php b/apps/user_ldap/lib/User/Manager.php
index 3f3e8cd3be3..c7660a40ba6 100644
--- a/apps/user_ldap/lib/User/Manager.php
+++ b/apps/user_ldap/lib/User/Manager.php
@@ -130,7 +130,7 @@ class Manager {
$this->checkAccess();
$user = new User($uid, $dn, $this->access, $this->ocConfig,
$this->ocFilesystem, clone $this->image, $this->ocLog,
- $this->avatarManager, $this->userManager,
+ $this->avatarManager, $this->userManager,
$this->notificationManager);
$this->usersByDN[$dn] = $user;
$this->usersByUid[$uid] = $user;
@@ -264,7 +264,7 @@ class Manager {
return $this->usersByUid[$id];
}
- if($this->access->stringResemblesDN($id) ) {
+ if($this->access->stringResemblesDN($id)) {
$uid = $this->access->dn2username($id);
if($uid !== false) {
return $this->createAndCache($id, $uid);
diff --git a/apps/user_ldap/lib/User/User.php b/apps/user_ldap/lib/User/User.php
index ccd40621704..2c038e43285 100644
--- a/apps/user_ldap/lib/User/User.php
+++ b/apps/user_ldap/lib/User/User.php
@@ -327,12 +327,12 @@ class User {
if ($path !== '') {
//if attribute's value is an absolute path take this, otherwise append it to data dir
//check for / at the beginning or pattern c:\ resp. c:/
- if( '/' !== $path[0]
+ if('/' !== $path[0]
&& !(3 < strlen($path) && ctype_alpha($path[0])
&& $path[1] === ':' && ('\\' === $path[2] || '/' === $path[2]))
) {
$path = $this->config->getSystemValue('datadirectory',
- \OC::$SERVERROOT.'/data' ) . '/' . $path;
+ \OC::$SERVERROOT.'/data') . '/' . $path;
}
//we need it to store it in the DB as well in case a user gets
//deleted so we can clean up afterwards
@@ -342,7 +342,7 @@ class User {
return $path;
}
- if( !is_null($attr)
+ if(!is_null($attr)
&& $this->config->getAppValue('user_ldap', 'enforce_home_folder_naming_rule', true)
) {
// a naming rule attribute is defined, but it doesn't exist for that LDAP user
diff --git a/apps/user_ldap/templates/settings.php b/apps/user_ldap/templates/settings.php
index 0ac3a2bcc40..bbc809481ac 100644
--- a/apps/user_ldap/templates/settings.php
+++ b/apps/user_ldap/templates/settings.php
@@ -83,7 +83,7 @@ style('user_ldap', 'settings');
<p><label for="ldap_backup_host"><?php p($l->t('Backup (Replica) Host'));?></label><input type="text" id="ldap_backup_host" name="ldap_backup_host" data-default="<?php p($_['ldap_backup_host_default']); ?>" title="<?php p($l->t('Give an optional backup host. It must be a replica of the main LDAP/AD server.'));?>"></p>
<p><label for="ldap_backup_port"><?php p($l->t('Backup (Replica) Port'));?></label><input type="number" id="ldap_backup_port" name="ldap_backup_port" data-default="<?php p($_['ldap_backup_port_default']); ?>" /></p>
<p><label for="ldap_override_main_server"><?php p($l->t('Disable Main Server'));?></label><input type="checkbox" id="ldap_override_main_server" name="ldap_override_main_server" value="1" data-default="<?php p($_['ldap_override_main_server_default']); ?>" title="<?php p($l->t('Only connect to the replica server.'));?>" /></p>
- <p><label for="ldap_turn_off_cert_check"><?php p($l->t('Turn off SSL certificate validation.'));?></label><input type="checkbox" id="ldap_turn_off_cert_check" name="ldap_turn_off_cert_check" title="<?php p($l->t('Not recommended, use it for testing only! If connection only works with this option, import the LDAP server\'s SSL certificate in your %s server.', [$theme->getName()] ));?>" data-default="<?php p($_['ldap_turn_off_cert_check_default']); ?>" value="1"><br/></p>
+ <p><label for="ldap_turn_off_cert_check"><?php p($l->t('Turn off SSL certificate validation.'));?></label><input type="checkbox" id="ldap_turn_off_cert_check" name="ldap_turn_off_cert_check" title="<?php p($l->t('Not recommended, use it for testing only! If connection only works with this option, import the LDAP server\'s SSL certificate in your %s server.', [$theme->getName()]));?>" data-default="<?php p($_['ldap_turn_off_cert_check_default']); ?>" value="1"><br/></p>
<p><label for="ldap_cache_ttl"><?php p($l->t('Cache Time-To-Live'));?></label><input type="number" id="ldap_cache_ttl" name="ldap_cache_ttl" title="<?php p($l->t('in seconds. A change empties the cache.'));?>" data-default="<?php p($_['ldap_cache_ttl_default']); ?>" /></p>
</div>
<h3><?php p($l->t('Directory Settings'));?></h3>
diff --git a/apps/user_ldap/tests/GroupLDAPPluginTest.php b/apps/user_ldap/tests/GroupLDAPPluginTest.php
index 73c5271960b..b5d9c40862b 100644
--- a/apps/user_ldap/tests/GroupLDAPPluginTest.php
+++ b/apps/user_ldap/tests/GroupLDAPPluginTest.php
@@ -152,7 +152,7 @@ class GroupLDAPPluginTest extends \Test\TestCase {
$pluginManager = $this->getGroupPluginManager();
$pluginManager->addToGroup('foo', 'bar');
- }
+ }
public function testRemoveFromGroup() {
$pluginManager = $this->getGroupPluginManager();
@@ -214,7 +214,7 @@ class GroupLDAPPluginTest extends \Test\TestCase {
$pluginManager = $this->getGroupPluginManager();
$pluginManager->countUsersInGroup('foo', 'bar');
- }
+ }
public function testgetGroupDetails() {
$pluginManager = $this->getGroupPluginManager();
diff --git a/apps/user_ldap/tests/Group_LDAPTest.php b/apps/user_ldap/tests/Group_LDAPTest.php
index a81255c10a9..cf6e2d7bb84 100644
--- a/apps/user_ldap/tests/Group_LDAPTest.php
+++ b/apps/user_ldap/tests/Group_LDAPTest.php
@@ -194,7 +194,7 @@ class Group_LDAPTest extends TestCase {
$ldap = new GroupLDAP($access, $pluginManager);
$this->assertEquals($ldap->countUsersInGroup('gid', 'search'),42);
- }
+ }
public function testGidNumber2NameSuccess() {
$access = $this->getAccessMock();
diff --git a/apps/user_ldap/tests/Integration/ExceptionOnLostConnection.php b/apps/user_ldap/tests/Integration/ExceptionOnLostConnection.php
index 50c45b49048..33eb1c70d6f 100644
--- a/apps/user_ldap/tests/Integration/ExceptionOnLostConnection.php
+++ b/apps/user_ldap/tests/Integration/ExceptionOnLostConnection.php
@@ -36,7 +36,7 @@ use OCA\User_LDAP\LDAP;
*
* LDAP must be available via toxiproxy.
*
- * This test must be run manually.
+ * This test must be run manually.
*
*/
class ExceptionOnLostConnection {
diff --git a/apps/user_ldap/tests/Jobs/CleanUpTest.php b/apps/user_ldap/tests/Jobs/CleanUpTest.php
index 75bd6f0b08e..bf4c8b75bac 100644
--- a/apps/user_ldap/tests/Jobs/CleanUpTest.php
+++ b/apps/user_ldap/tests/Jobs/CleanUpTest.php
@@ -55,7 +55,7 @@ class CleanUpTest extends \Test\TestCase {
$args = $this->getMocks();
$args['helper']->expects($this->once())
->method('haveDisabledConfigurations')
- ->willReturn(true );
+ ->willReturn(true);
$args['ocConfig']->expects($this->never())
->method('getSystemValue');
diff --git a/apps/user_ldap/tests/UserLDAPPluginTest.php b/apps/user_ldap/tests/UserLDAPPluginTest.php
index 58bc63e442f..03557ec174b 100644
--- a/apps/user_ldap/tests/UserLDAPPluginTest.php
+++ b/apps/user_ldap/tests/UserLDAPPluginTest.php
@@ -153,7 +153,7 @@ class UserLDAPPluginTest extends \Test\TestCase {
$pluginManager = $this->getUserPluginManager();
$pluginManager->getHome('foo');
- }
+ }
public function testGetDisplayName() {
$pluginManager = $this->getUserPluginManager();
@@ -204,7 +204,7 @@ class UserLDAPPluginTest extends \Test\TestCase {
);
$pluginManager->register($plugin);
- $pluginManager->setDisplayName('user', 'password');
+ $pluginManager->setDisplayName('user', 'password');
}
@@ -214,7 +214,7 @@ class UserLDAPPluginTest extends \Test\TestCase {
$pluginManager = $this->getUserPluginManager();
$pluginManager->setDisplayName('foo', 'bar');
- }
+ }
public function testCanChangeAvatar() {
$pluginManager = $this->getUserPluginManager();
@@ -271,7 +271,7 @@ class UserLDAPPluginTest extends \Test\TestCase {
$pluginManager = $this->getUserPluginManager();
$pluginManager->countUsers();
- }
+ }
public function testDeleteUser() {
$pluginManager = $this->getUserPluginManager();