Archived
1
0

Fixed issue for not showing new values after submitting the configuration screen

Closes #1
This commit is contained in:
2015-07-19 23:32:38 +02:00
parent 21fe3aadbc
commit 247cc5a6b7

View File

@@ -12,10 +12,7 @@ $me = new Ldap();
$me->load_config(); $me->load_config();
//$me = get_plugin_data($plugin_id); //$me = get_plugin_data($plugin_id);
$template->assign('ALLOW_NEWUSERS', $me->config['allow_newusers']); // Save LDAP configuration when submitted
$template->assign('ADVERTISE_ADMINS', $me->config['advertise_admin_new_ldapuser']);
$template->assign('SEND_CASUAL_MAIL', $me->config['send_password_by_mail_ldap']);
if (isset($_POST['save'])){ if (isset($_POST['save'])){
if (isset($_POST['ALLOW_NEWUSERS'])){ if (isset($_POST['ALLOW_NEWUSERS'])){
@@ -34,11 +31,7 @@ if (isset($_POST['save'])){
$me->config['send_password_by_mail_ldap'] = True; $me->config['send_password_by_mail_ldap'] = True;
} else { } else {
$me->config['send_password_by_mail_ldap'] = False; $me->config['send_password_by_mail_ldap'] = False;
}
}
// Save LDAP configuration
if (isset($_POST['save'])){
$me->save_config(); $me->save_config();
} }
@@ -48,5 +41,10 @@ if (isset($_POST['save'])){
// what do we do when there's no mail in the ldap ? // what do we do when there's no mail in the ldap ?
// do we send mail to admins ? // do we send mail to admins ?
// And build up the form with the new values
$template->assign('ALLOW_NEWUSERS', $me->config['allow_newusers']);
$template->assign('ADVERTISE_ADMINS', $me->config['advertise_admin_new_ldapuser']);
$template->assign('SEND_CASUAL_MAIL', $me->config['send_password_by_mail_ldap']);
$template->assign_var_from_handle( 'ADMIN_CONTENT', 'plugin_admin_content'); $template->assign_var_from_handle( 'ADMIN_CONTENT', 'plugin_admin_content');
?> ?>