summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/lib/connection.php
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2013-05-07 12:45:43 -0700
committerBart Visscher <bartv@thisnet.nl>2013-05-07 12:45:43 -0700
commit175633d380e2073ce2f17108701df2b65e3c7e75 (patch)
tree42f953a1b54363bc8ca2571a70d30b64765dbdbd /apps/user_ldap/lib/connection.php
parent5b61c5d478ab5b4345bb1ab211550e60078c318a (diff)
parentd6b13ccd12e48257e0d085d190f57b159795c6dc (diff)
downloadnextcloud-server-175633d380e2073ce2f17108701df2b65e3c7e75.tar.gz
nextcloud-server-175633d380e2073ce2f17108701df2b65e3c7e75.zip
Merge pull request #3050 from owncloud/===_and_!==_in_user_ldap-app
Use === and !== in user_ldap app
Diffstat (limited to 'apps/user_ldap/lib/connection.php')
-rw-r--r--apps/user_ldap/lib/connection.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/user_ldap/lib/connection.php b/apps/user_ldap/lib/connection.php
index ef7cc5295b3..88ff318586a 100644
--- a/apps/user_ldap/lib/connection.php
+++ b/apps/user_ldap/lib/connection.php
@@ -99,7 +99,7 @@ class Connection {
public function __set($name, $value) {
$changed = false;
//only few options are writable
- if($name == 'ldapUuidAttribute') {
+ if($name === 'ldapUuidAttribute') {
\OCP\Util::writeLog('user_ldap', 'Set config ldapUuidAttribute to '.$value, \OCP\Util::DEBUG);
$this->config[$name] = $value;
if(!empty($this->configID)) {
@@ -321,9 +321,9 @@ class Connection {
$params = $this->getConfigTranslationArray();
foreach($config as $parameter => $value) {
- if(($parameter == 'homeFolderNamingRule'
+ if(($parameter === 'homeFolderNamingRule'
|| (isset($params[$parameter])
- && $params[$parameter] == 'homeFolderNamingRule'))
+ && $params[$parameter] === 'homeFolderNamingRule'))
&& !empty($value)) {
$value = 'attr:'.$value;
}
@@ -389,7 +389,7 @@ class Connection {
$trans = $this->getConfigTranslationArray();
$config = array();
foreach($trans as $dbKey => $classKey) {
- if($classKey == 'homeFolderNamingRule') {
+ if($classKey === 'homeFolderNamingRule') {
if(strpos($this->config[$classKey], 'attr:') === 0) {
$config[$dbKey] = substr($this->config[$classKey], 5);
} else {
@@ -442,7 +442,7 @@ class Connection {
}
foreach(array('ldapAttributesForUserSearch', 'ldapAttributesForGroupSearch') as $key) {
if(is_array($this->config[$key])
- && count($this->config[$key]) == 1
+ && count($this->config[$key]) === 1
&& empty($this->config[$key][0])) {
$this->config[$key] = array();
}
@@ -590,12 +590,12 @@ class Connection {
$error = null;
//if LDAP server is not reachable, try the Backup (Replica!) Server
- if((!$bindStatus && ($error == -1))
+ if((!$bindStatus && ($error === -1))
|| $this->config['ldapOverrideMainServer']
|| $this->getFromCache('overrideMainServer')) {
$this->doConnect($this->config['ldapBackupHost'], $this->config['ldapBackupPort']);
$bindStatus = $this->bind();
- if($bindStatus && $error == -1) {
+ if($bindStatus && $error === -1) {
//when bind to backup server succeeded and failed to main server,
//skip contacting him until next cache refresh
$this->writeToCache('overrideMainServer', true);