diff --git a/apps/user_ldap/js/wizard/wizard.js b/apps/user_ldap/js/wizard/wizard.js index e8450d1c78..62a3fccbdf 100644 --- a/apps/user_ldap/js/wizard/wizard.js +++ b/apps/user_ldap/js/wizard/wizard.js @@ -70,7 +70,7 @@ OCA = OCA || {}; controller.setView(view); controller.setModel(model); controller.run(); - } + }; OCA.LDAP.Wizard.Wizard = Wizard; })(); diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php index 299ad58164..12d71b1528 100644 --- a/apps/user_ldap/lib/Access.php +++ b/apps/user_ldap/lib/Access.php @@ -869,7 +869,7 @@ class Access extends LDAPUtility implements IUserTools { //browsing through prior pages to get the cookie for the new one if($skipHandling) { - return; + return false; } // if count is bigger, then the server does not support // paged search. Instead, he did a normal search. We set a @@ -983,7 +983,6 @@ class Access extends LDAPUtility implements IUserTools { $findings = array(); $savedoffset = $offset; do { - $continue = false; $search = $this->executeSearch($filter, $base, $attr, $limit, $offset); if($search === false) { return array(); diff --git a/apps/user_ldap/lib/Configuration.php b/apps/user_ldap/lib/Configuration.php index 2fa42efda2..54dfe6779b 100644 --- a/apps/user_ldap/lib/Configuration.php +++ b/apps/user_ldap/lib/Configuration.php @@ -106,12 +106,13 @@ class Configuration { /** * @param string $name - * @return mixed|void + * @return mixed|null */ public function __get($name) { if(isset($this->config[$name])) { return $this->config[$name]; } + return null; } /** @@ -182,7 +183,7 @@ class Configuration { $applied[] = $inputKey; } } - + return null; } public function readConfiguration() { diff --git a/apps/user_ldap/lib/Connection.php b/apps/user_ldap/lib/Connection.php index 7fb2652619..7d5b51fdfc 100644 --- a/apps/user_ldap/lib/Connection.php +++ b/apps/user_ldap/lib/Connection.php @@ -558,6 +558,7 @@ class Connection extends LDAPUtility { } return $bindStatus; } + return null; } /** @@ -580,6 +581,7 @@ class Connection extends LDAPUtility { } else { throw new \OC\ServerNotAvailableException('Could not set required LDAP Protocol version.'); } + return true; } /** diff --git a/apps/user_ldap/lib/Jobs/UpdateGroups.php b/apps/user_ldap/lib/Jobs/UpdateGroups.php index 047b95a6d9..3b951d20c4 100644 --- a/apps/user_ldap/lib/Jobs/UpdateGroups.php +++ b/apps/user_ldap/lib/Jobs/UpdateGroups.php @@ -44,7 +44,6 @@ class UpdateGroups extends \OC\BackgroundJob\TimedJob { static private $groupsFromDB; static private $groupBE; - static private $connector; public function __construct(){ $this->interval = self::getRefreshInterval(); diff --git a/apps/user_ldap/lib/LDAP.php b/apps/user_ldap/lib/LDAP.php index 5376d92a74..74d83e4ab4 100644 --- a/apps/user_ldap/lib/LDAP.php +++ b/apps/user_ldap/lib/LDAP.php @@ -259,6 +259,7 @@ class LDAP implements ILDAPWrapper { } return $result; } + return null; } /** diff --git a/apps/user_ldap/lib/User_LDAP.php b/apps/user_ldap/lib/User_LDAP.php index ce1aafc210..13e61c63c0 100644 --- a/apps/user_ldap/lib/User_LDAP.php +++ b/apps/user_ldap/lib/User_LDAP.php @@ -189,11 +189,6 @@ class User_LDAP extends BackendUtility implements \OCP\IUserBackend, \OCP\UserIn $this->access->connection->ldapUserDisplayName . '=*', $this->access->getFilterPartForUserSearch($search) )); - $attrs = array($this->access->connection->ldapUserDisplayName, 'dn'); - $additionalAttribute = $this->access->connection->ldapUserDisplayName2; - if(!empty($additionalAttribute)) { - $attrs[] = $additionalAttribute; - } \OCP\Util::writeLog('user_ldap', 'getUsers: Options: search '.$search.' limit '.$limit.' offset '.$offset.' Filter: '.$filter, diff --git a/apps/user_ldap/lib/Wizard.php b/apps/user_ldap/lib/Wizard.php index 573d30f000..852c806b10 100644 --- a/apps/user_ldap/lib/Wizard.php +++ b/apps/user_ldap/lib/Wizard.php @@ -943,7 +943,6 @@ class Wizard extends LDAPUtility { $cns = $this->configuration->ldapGroupFilterGroups; if(is_array($cns) && count($cns) > 0) { $filter .= '(|'; - $base = $this->configuration->ldapBase[0]; foreach($cns as $cn) { $filter .= '(cn=' . $cn . ')'; } diff --git a/apps/user_ldap/tests/AccessTest.php b/apps/user_ldap/tests/AccessTest.php index 2fddafa214..5e99583c70 100644 --- a/apps/user_ldap/tests/AccessTest.php +++ b/apps/user_ldap/tests/AccessTest.php @@ -201,6 +201,7 @@ class AccessTest extends \Test\TestCase { return $case['interResult']; } } + return null; })); foreach($cases as $case) { diff --git a/apps/user_ldap/tests/ConfigurationTest.php b/apps/user_ldap/tests/ConfigurationTest.php index 9951b97e06..797d2598be 100644 --- a/apps/user_ldap/tests/ConfigurationTest.php +++ b/apps/user_ldap/tests/ConfigurationTest.php @@ -93,14 +93,6 @@ class ConfigurationTest extends \Test\TestCase { public function testSetValue($key, $input, $expected) { $configuration = new \OCA\User_LDAP\Configuration('t01', false); - $settingsInput = array( - 'ldapBaseUsers' => array( - 'cn=someUsers,dc=example,dc=org', - ' ', - ' cn=moreUsers,dc=example,dc=org ' - ) - ); - $configuration->setConfiguration([$key => $input]); $this->assertSame($configuration->$key, $expected); } diff --git a/apps/user_ldap/tests/Integration/Lib/IntegrationTestUserHome.php b/apps/user_ldap/tests/Integration/Lib/IntegrationTestUserHome.php index 95c14ca894..2200ac327a 100644 --- a/apps/user_ldap/tests/Integration/Lib/IntegrationTestUserHome.php +++ b/apps/user_ldap/tests/Integration/Lib/IntegrationTestUserHome.php @@ -111,7 +111,7 @@ class IntegrationTestUserHome extends AbstractIntegrationTest { */ protected function case2() { \OC::$server->getConfig()->setAppValue('user_ldap', 'enforce_home_folder_naming_rule', true); - $userManager = \oc::$server->getUserManager(); + $userManager = \OC::$server->getUserManager(); // clearing backends is critical, otherwise the userManager will have // the user objects cached and the value from case1 returned $userManager->clearBackends(); @@ -144,7 +144,7 @@ class IntegrationTestUserHome extends AbstractIntegrationTest { $this->connection->setConfiguration([ 'homeFolderNamingRule' => 'attr:', ]); - $userManager = \oc::$server->getUserManager(); + $userManager = \OC::$server->getUserManager(); $userManager->clearBackends(); $userManager->registerBackend($this->backend); $users = $userManager->search('', 5, 0); diff --git a/apps/user_ldap/tests/User/ManagerTest.php b/apps/user_ldap/tests/User/ManagerTest.php index 0c370f12c4..b3f22d6a06 100644 --- a/apps/user_ldap/tests/User/ManagerTest.php +++ b/apps/user_ldap/tests/User/ManagerTest.php @@ -208,7 +208,6 @@ class ManagerTest extends \Test\TestCase { list($access, $config, $filesys, $image, $log, $avaMgr, $dbc, $userMgr) = $this->getTestInstances(); - $dn = 'cn=foo,dc=foobar,dc=bar'; $uid = 'gone'; $access->expects($this->never())