summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2012-04-15 14:47:33 +0200
committerArthur Schiwon <blizzz@owncloud.com>2012-04-15 14:50:03 +0200
commit0a46c7a393c9eda86eda1b450dcc10436626db4c (patch)
treed7840ba7d67af8d552463ef9f8d4bcabc891783d
parent2a03db606556f6536c04cf0f4d45d553a215041a (diff)
downloadnextcloud-server-0a46c7a393c9eda86eda1b450dcc10436626db4c.tar.gz
nextcloud-server-0a46c7a393c9eda86eda1b450dcc10436626db4c.zip
group LDAP: usersInGroup not getUsersInGroup
offer static readonly properties
-rw-r--r--apps/user_ldap/group_ldap.php4
-rw-r--r--apps/user_ldap/lib_ldap.php10
2 files changed, 11 insertions, 3 deletions
diff --git a/apps/user_ldap/group_ldap.php b/apps/user_ldap/group_ldap.php
index 19a488b8434..92e3b53d249 100644
--- a/apps/user_ldap/group_ldap.php
+++ b/apps/user_ldap/group_ldap.php
@@ -77,13 +77,13 @@ class OC_GROUP_LDAP extends OC_Group_Backend {
* @brief get a list of all users in a group
* @returns array with user ids
*/
- public function getUsersInGroup($gid) {
+ public function usersInGroup($gid) {
$filter = OC_LDAP::combineFilterWithAnd(array(
$this->ldapGroupFilter,
$this->ldapGroupDisplayName.'='.$gid
));
- return $this->retrieveList($filter, OC_LDAP::ldapUserDisplayName);
+ return $this->retrieveList($filter, OC_LDAP::conf('ldapUserDisplayName'));
}
/**
diff --git a/apps/user_ldap/lib_ldap.php b/apps/user_ldap/lib_ldap.php
index 4a4784eb159..5188ef94026 100644
--- a/apps/user_ldap/lib_ldap.php
+++ b/apps/user_ldap/lib_ldap.php
@@ -36,7 +36,7 @@ class OC_LDAP {
static protected $ldapTLS;
static protected $ldapNoCase;
// user and group settings, that are needed in both backends
- static protected $ldapUserDisplayName;
+ static public $ldapUserDisplayName;
static public function init() {
@@ -44,6 +44,14 @@ class OC_LDAP {
self::establishConnection();
}
+ static public function conf($key) {
+ $availableProperties = array('ldapUserDisplayName');
+
+ if(in_array($key, $availableProperties)) {
+ return self::$$key;
+ }
+ }
+
/**
* @brief executes an LDAP search
* @param $filter the LDAP filter for the search