diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2012-04-14 18:26:46 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2012-04-14 18:26:51 +0200 |
commit | 29bb5d27e4c2cddeb8ef07dcd28b2322743c6f6b (patch) | |
tree | 7cff1b42d952b2266d1fabcdc7a03feef4757d98 /apps | |
parent | 8113a432522d756378d42df7e06d386f55146a80 (diff) | |
download | nextcloud-server-29bb5d27e4c2cddeb8ef07dcd28b2322743c6f6b.tar.gz nextcloud-server-29bb5d27e4c2cddeb8ef07dcd28b2322743c6f6b.zip |
few pieces of documentation
Diffstat (limited to 'apps')
-rw-r--r-- | apps/user_ldap/lib_ldap.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/apps/user_ldap/lib_ldap.php b/apps/user_ldap/lib_ldap.php index 846a7a44cfc..62e478597bd 100644 --- a/apps/user_ldap/lib_ldap.php +++ b/apps/user_ldap/lib_ldap.php @@ -39,6 +39,14 @@ self::establishConnection(); } + /** + * @brief executes an LDAP search + * @param $filter the LDAP filter for the search + * @param $attr optional, when a certain attribute shall be filtered out + * @returns array with the search result + * + * Executes an LDAP search + */ static public function search($filter, $attr = null) { $sr = ldap_search(self::getConnectionResource(), self::$ldapBase, $filter); $findings = ldap_get_entries(self::getConnectionResource(), $sr ); @@ -56,6 +64,9 @@ return $findings; } + /** + * Returns the LDAP handler + */ static private function getConnectionResource() { if(!self::$ldapConnectionRes) { self::init(); @@ -63,6 +74,9 @@ return self::$ldapConnectionRes; } + /** + * Caches the general LDAP configuration. + */ static private function readConfiguration() { if(!self::$configured) { self::$ldapHost = OC_Appconfig::getValue('user_ldap', 'ldap_host', ''); @@ -78,6 +92,9 @@ } } + /** + * Connects and Binds to LDAP + */ static private function establishConnection() { if(!self::$ldapConnectionRes) { self::$ldapConnectionRes = ldap_connect(self::$ldapHost, self::$ldapPort); |