summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-02-13 21:55:24 +0100
committerMorris Jobke <hey@morrisjobke.de>2018-02-13 21:55:24 +0100
commite2974f1133693c022585d3758df142e0f385cb3e (patch)
treef8d1110d68580b8307e78e1844964b2df486d071 /apps/user_ldap
parent3fc6d6234e39914d8e6e7d4b9ffe0b5420d3aa2d (diff)
downloadnextcloud-server-e2974f1133693c022585d3758df142e0f385cb3e.tar.gz
nextcloud-server-e2974f1133693c022585d3758df142e0f385cb3e.zip
Simplify return statement
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/user_ldap')
-rw-r--r--apps/user_ldap/lib/Access.php9
-rw-r--r--apps/user_ldap/lib/Group_LDAP.php8
-rw-r--r--apps/user_ldap/lib/Jobs/CleanUp.php4
3 files changed, 6 insertions, 15 deletions
diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php
index 3d182077764..c02cc968637 100644
--- a/apps/user_ldap/lib/Access.php
+++ b/apps/user_ldap/lib/Access.php
@@ -419,8 +419,7 @@ class Access extends LDAPUtility implements IUserTools {
$domainParts[] = $part;
}
}
- $domainDN = implode(',', $domainParts);
- return $domainDN;
+ return implode(',', $domainParts);
}
/**
@@ -800,8 +799,7 @@ class Access extends LDAPUtility implements IUserTools {
public function fetchUsersByLoginName($loginName, $attributes = array('dn')) {
$loginName = $this->escapeFilterPart($loginName);
$filter = str_replace('%uid', $loginName, $this->connection->ldapLoginFilter);
- $users = $this->fetchListOfUsers($filter, $attributes);
- return $users;
+ return $this->fetchListOfUsers($filter, $attributes);
}
/**
@@ -814,8 +812,7 @@ class Access extends LDAPUtility implements IUserTools {
public function countUsersByLoginName($loginName) {
$loginName = $this->escapeFilterPart($loginName);
$filter = str_replace('%uid', $loginName, $this->connection->ldapLoginFilter);
- $users = $this->countUsers($filter);
- return $users;
+ return $this->countUsers($filter);
}
/**
diff --git a/apps/user_ldap/lib/Group_LDAP.php b/apps/user_ldap/lib/Group_LDAP.php
index e1e6a78c44b..6cb56941463 100644
--- a/apps/user_ldap/lib/Group_LDAP.php
+++ b/apps/user_ldap/lib/Group_LDAP.php
@@ -370,9 +370,7 @@ class Group_LDAP extends BackendUtility implements \OCP\GroupInterface, IGroupLD
}
$filterParts[] = $this->access->connection->ldapGidNumber .'=' . $groupID;
- $filter = $this->access->combineFilterWithAnd($filterParts);
-
- return $filter;
+ return $this->access->combineFilterWithAnd($filterParts);
}
/**
@@ -534,9 +532,7 @@ class Group_LDAP extends BackendUtility implements \OCP\GroupInterface, IGroupLD
}
$filterParts[] = 'primaryGroupID=' . $groupID;
- $filter = $this->access->combineFilterWithAnd($filterParts);
-
- return $filter;
+ return $this->access->combineFilterWithAnd($filterParts);
}
/**
diff --git a/apps/user_ldap/lib/Jobs/CleanUp.php b/apps/user_ldap/lib/Jobs/CleanUp.php
index df7d888a902..f905256c696 100644
--- a/apps/user_ldap/lib/Jobs/CleanUp.php
+++ b/apps/user_ldap/lib/Jobs/CleanUp.php
@@ -172,9 +172,7 @@ class CleanUp extends TimedJob {
return false;
}
- $enabled = $this->isCleanUpEnabled();
-
- return $enabled;
+ return $this->isCleanUpEnabled();
}
/**