summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/settings.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/user_ldap/settings.php')
-rw-r--r--apps/user_ldap/settings.php21
1 files changed, 17 insertions, 4 deletions
diff --git a/apps/user_ldap/settings.php b/apps/user_ldap/settings.php
index 8dbd3c0462b..1f2d8ed9af3 100644
--- a/apps/user_ldap/settings.php
+++ b/apps/user_ldap/settings.php
@@ -20,11 +20,21 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
-$params = array('ldap_host', 'ldap_port', 'ldap_dn', 'ldap_password', 'ldap_base', 'ldap_filter');
+$params = array('ldap_host', 'ldap_port', 'ldap_dn', 'ldap_password', 'ldap_base', 'ldap_filter', 'ldap_display_name', 'ldap_tls', 'ldap_nocase');
-foreach($params as $param){
- if(isset($_POST[$param])){
- OC_Appconfig::setValue('user_ldap', $param, $_POST[$param]);
+if ($_POST) {
+ foreach($params as $param){
+ if(isset($_POST[$param])){
+ OC_Appconfig::setValue('user_ldap', $param, $_POST[$param]);
+ }
+ elseif('ldap_tls' == $param) {
+ // unchecked checkboxes are not included in the post paramters
+ OC_Appconfig::setValue('user_ldap', $param, 0);
+ }
+ elseif('ldap_nocase' == $param) {
+ OC_Appconfig::setValue('user_ldap', $param, 0);
+ }
+
}
}
@@ -38,4 +48,7 @@ foreach($params as $param){
// ldap_port has a default value
$tmpl->assign( 'ldap_port', OC_Appconfig::getValue('user_ldap', 'ldap_port', OC_USER_BACKEND_LDAP_DEFAULT_PORT));
+// ldap_display_name has a default value
+$tmpl->assign( 'ldap_display_name', OC_Appconfig::getValue('user_ldap', 'ldap_display_name', OC_USER_BACKEND_LDAP_DEFAULT_DISPLAY_NAME));
+
return $tmpl->fetchPage();