summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/lib
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2013-09-11 19:42:08 +0200
committerArthur Schiwon <blizzz@owncloud.com>2013-09-27 13:34:15 +0200
commit81cf4a22efb4dd7303a3aa3451e29992562b19f0 (patch)
treeea06a2b044b0521901fd548162bf2118558e6a54 /apps/user_ldap/lib
parent84f522f406d2bec8dff5acb0c7defc54b8e7d79a (diff)
downloadnextcloud-server-81cf4a22efb4dd7303a3aa3451e29992562b19f0.tar.gz
nextcloud-server-81cf4a22efb4dd7303a3aa3451e29992562b19f0.zip
LDAP: coding style
Diffstat (limited to 'apps/user_ldap/lib')
-rw-r--r--apps/user_ldap/lib/access.php6
-rw-r--r--apps/user_ldap/lib/backendutility.php2
-rw-r--r--apps/user_ldap/lib/connection.php10
-rw-r--r--apps/user_ldap/lib/ildapwrapper.php2
-rw-r--r--apps/user_ldap/lib/ldaputility.php2
5 files changed, 14 insertions, 8 deletions
diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php
index 3d791755aba..fdf9c24612d 100644
--- a/apps/user_ldap/lib/access.php
+++ b/apps/user_ldap/lib/access.php
@@ -80,7 +80,8 @@ class Access extends LDAPUtility {
return false;
}
//LDAP attributes are not case sensitive
- $result = \OCP\Util::mb_array_change_key_case($this->ldap->getAttributes($cr, $er), MB_CASE_LOWER, 'UTF-8');
+ $result = \OCP\Util::mb_array_change_key_case(
+ $this->ldap->getAttributes($cr, $er), MB_CASE_LOWER, 'UTF-8');
$attr = mb_strtolower($attr, 'UTF-8');
if(isset($result[$attr]) && $result[$attr]['count'] > 0) {
@@ -669,7 +670,8 @@ class Access extends LDAPUtility {
$error = $this->ldap->errno($link_resource);
if(!is_array($sr) || $error !== 0) {
\OCP\Util::writeLog('user_ldap',
- 'Error when searching: '.$this->ldap->error($link_resource).' code '.$this->ldap->errno($link_resource),
+ 'Error when searching: '.$this->ldap->error($link_resource).
+ ' code '.$this->ldap->errno($link_resource),
\OCP\Util::ERROR);
\OCP\Util::writeLog('user_ldap', 'Attempt for Paging? '.print_r($pagedSearchOK, true), \OCP\Util::ERROR);
return array();
diff --git a/apps/user_ldap/lib/backendutility.php b/apps/user_ldap/lib/backendutility.php
index f279b1e997e..815757a1a11 100644
--- a/apps/user_ldap/lib/backendutility.php
+++ b/apps/user_ldap/lib/backendutility.php
@@ -35,4 +35,4 @@ abstract class BackendUtility {
public function __construct(Access $access) {
$this->access = $access;
}
-} \ No newline at end of file
+}
diff --git a/apps/user_ldap/lib/connection.php b/apps/user_ldap/lib/connection.php
index 053ec7e2355..a53022c27b3 100644
--- a/apps/user_ldap/lib/connection.php
+++ b/apps/user_ldap/lib/connection.php
@@ -396,7 +396,8 @@ class Connection extends LDAPUtility {
public function saveConfiguration() {
$trans = array_flip($this->getConfigTranslationArray());
foreach($this->config as $key => $value) {
- \OCP\Util::writeLog('user_ldap', 'LDAP: storing key '.$key.' value '.print_r($value, true), \OCP\Util::DEBUG);
+ \OCP\Util::writeLog('user_ldap', 'LDAP: storing key '.$key.
+ ' value '.print_r($value, true), \OCP\Util::DEBUG);
switch ($key) {
case 'ldapAgentPassword':
$value = base64_encode($value);
@@ -634,7 +635,8 @@ class Connection extends LDAPUtility {
if(!$this->config['ldapOverrideMainServer'] && !$this->getFromCache('overrideMainServer')) {
$this->doConnect($this->config['ldapHost'], $this->config['ldapPort']);
$bindStatus = $this->bind();
- $error = $this->ldap->isResource($this->ldapConnectionRes) ? $this->ldap->errno($this->ldapConnectionRes) : -1;
+ $error = $this->ldap->isResource($this->ldapConnectionRes) ?
+ $this->ldap->errno($this->ldapConnectionRes) : -1;
} else {
$bindStatus = false;
$error = null;
@@ -692,7 +694,9 @@ class Connection extends LDAPUtility {
if(!$this->ldap->isResource($cr)) {
return false;
}
- $ldapLogin = @$this->ldap->bind($cr, $this->config['ldapAgentName'], $this->config['ldapAgentPassword']);
+ $ldapLogin = @$this->ldap->bind($cr,
+ $this->config['ldapAgentName'],
+ $this->config['ldapAgentPassword']);
if(!$ldapLogin) {
\OCP\Util::writeLog('user_ldap',
'Bind failed: ' . $this->ldap->errno($cr) . ': ' . $this->ldap->error($cr),
diff --git a/apps/user_ldap/lib/ildapwrapper.php b/apps/user_ldap/lib/ildapwrapper.php
index be35cebe945..9e6bd56ef2a 100644
--- a/apps/user_ldap/lib/ildapwrapper.php
+++ b/apps/user_ldap/lib/ildapwrapper.php
@@ -177,4 +177,4 @@ interface ILDAPWrapper {
*/
public function isResource($resource);
-} \ No newline at end of file
+}
diff --git a/apps/user_ldap/lib/ldaputility.php b/apps/user_ldap/lib/ldaputility.php
index 975df7d1de0..7fffd9c88d1 100644
--- a/apps/user_ldap/lib/ldaputility.php
+++ b/apps/user_ldap/lib/ldaputility.php
@@ -33,4 +33,4 @@ abstract class LDAPUtility {
public function __construct(ILDAPWrapper $ldapWrapper) {
$this->ldap = $ldapWrapper;
}
-} \ No newline at end of file
+}