コード例 #1
0
 /**
  * @brief Get a list of all users
  * @returns array with all uids
  *
  * Get a list of all users.
  */
 public function getUsers()
 {
     if (is_null($this->_users)) {
         $ldap_users = OC_LDAP::fetchListOfUsers($this->ldapUserFilter, array(OC_LDAP::conf('ldapUserDisplayName'), 'dn'));
         $this->_users = OC_LDAP::ownCloudUserNames($ldap_users);
     }
     return $this->_users;
 }
コード例 #2
0
 /**
  * @brief get a list of all groups
  * @returns array with group names
  *
  * Returns a list with all groups
  */
 public function getGroups()
 {
     if (!$this->configured) {
         return array();
     }
     if (empty($this->_groups)) {
         $ldap_groups = OC_LDAP::fetchListOfGroups($this->ldapGroupFilter, array(OC_LDAP::conf('ldapGroupDisplayName'), 'dn'));
         $this->_groups = OC_LDAP::ownCloudGroupNames($ldap_groups);
     }
     return $this->_groups;
 }