summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/lib
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2013-01-30 03:44:11 +0100
committerArthur Schiwon <blizzz@owncloud.com>2013-01-30 03:44:11 +0100
commite8db1e884e2792476de1ea2b33804c9665526b7d (patch)
tree89acc25dd9dcfb166421791f28cbce870fdcfb7b /apps/user_ldap/lib
parent14bc6f8c6c87bbb16529d2e52208ddab9c56fde6 (diff)
downloadnextcloud-server-e8db1e884e2792476de1ea2b33804c9665526b7d.tar.gz
nextcloud-server-e8db1e884e2792476de1ea2b33804c9665526b7d.zip
LDAP: some inline documentation
Diffstat (limited to 'apps/user_ldap/lib')
-rw-r--r--apps/user_ldap/lib/connection.php7
-rw-r--r--apps/user_ldap/lib/helper.php5
2 files changed, 12 insertions, 0 deletions
diff --git a/apps/user_ldap/lib/connection.php b/apps/user_ldap/lib/connection.php
index 124ebe7aab2..2d34013c9d8 100644
--- a/apps/user_ldap/lib/connection.php
+++ b/apps/user_ldap/lib/connection.php
@@ -264,6 +264,9 @@ class Connection {
}
}
+ /**
+ * @return returns an array that maps internal variable names to database fields
+ */
private function getConfigTranslationArray() {
static $array = array('ldap_host'=>'ldapHost', 'ldap_port'=>'ldapPort', 'ldap_backup_host'=>'ldapBackupHost', 'ldap_backup_port'=>'ldapBackupPort', 'ldap_override_main_server' => 'ldapOverrideMainServer', 'ldap_dn'=>'ldapAgentName', 'ldap_agent_password'=>'ldapAgentPassword', 'ldap_base'=>'ldapBase', 'ldap_base_users'=>'ldapBaseUsers', 'ldap_base_groups'=>'ldapBaseGroups', 'ldap_userlist_filter'=>'ldapUserFilter', 'ldap_login_filter'=>'ldapLoginFilter', 'ldap_group_filter'=>'ldapGroupFilter', 'ldap_display_name'=>'ldapUserDisplayName', 'ldap_group_display_name'=>'ldapGroupDisplayName',
@@ -303,6 +306,10 @@ class Connection {
return $this->configured;
}
+ /**
+ * @brief saves the current Configuration in the database
+ingle parameters
+ */
public function saveConfiguration() {
$trans = array_flip($this->getConfigTranslationArray());
foreach($this->config as $key => $value) {
diff --git a/apps/user_ldap/lib/helper.php b/apps/user_ldap/lib/helper.php
index 263d95f898f..3c4b98af1a4 100644
--- a/apps/user_ldap/lib/helper.php
+++ b/apps/user_ldap/lib/helper.php
@@ -69,6 +69,11 @@ class Helper {
return $prefixes;
}
+ /**
+ * @brief deletes a given saved LDAP/AD server configuration.
+ * @param string the configuration prefix of the config to delete
+ * @return bool true on success, false otherweise
+ */
static public function deleteServerConfiguration($prefix) {
//just to be on the safe side
\OCP\User::checkAdminUser();