Configuration LDAP OK : '.$username.'
'); - } else { - $template->assign('LD_CHECK_LDAP','Credentials OK, Check GroupMembership for: '.$username.'
'); - } - } - else { - $template->assign('LD_CHECK_LDAP','Binding OK, but check credentials on server '.$me->config['uri'].' for user '.$username.'
'); - } - } elseif($error==1 && !$username){ - $template->assign('LD_CHECK_LDAP','Error : Binding OK, but no valid DN found on server '.$me->config['uri'].' for user '.$_POST['USERNAME'].'
'); - } elseif($error && $username){ - $template->assign('LD_CHECK_LDAP','Error : Binding OK, but check credentials on '.$me->config['uri'].' for user '.$_POST['USERNAME'].'
'); - } else { - $template->assign('LD_CHECK_LDAP','Error : '.$error.' for binding on server '.$me->config['uri'].' for user '.$_POST['USERNAME'].', check your binding!
'); - } -} - -// And build up the form with the new values -$template->assign('HOST', $me->config['host']); -$template->assign('BASEDN', $me->config['basedn']); // racine ! -$template->assign('PORT', $me->config['port']); -$template->assign('LD_ATTR', $me->config['ld_attr']); -$template->assign('LD_GROUP', $me->config['ld_group']); -$template->assign('LD_USE_SSL', $me->config['ld_use_ssl']); -$template->assign('LD_BINDPW', $me->config['ld_bindpw']); -$template->assign('LD_BINDDN', $me->config['ld_binddn']); - -$template->assign_var_from_handle( 'ADMIN_CONTENT', 'plugin_admin_content'); -?> diff --git a/sources/extra_files/app/plugins/Ldap_Login/admin/configuration.tpl b/sources/extra_files/app/plugins/Ldap_Login/admin/configuration.tpl deleted file mode 100644 index 4196166..0000000 --- a/sources/extra_files/app/plugins/Ldap_Login/admin/configuration.tpl +++ /dev/null @@ -1,114 +0,0 @@ -{'All LDAP users can use their ldap password everywhere on piwigo if needed.'|@translate}
- - - - -Configuration du plugin Ldap_Login
- - \ No newline at end of file diff --git a/sources/extra_files/app/plugins/Ldap_Login/admin/newusers.php b/sources/extra_files/app/plugins/Ldap_Login/admin/newusers.php deleted file mode 100644 index 8555e4f..0000000 --- a/sources/extra_files/app/plugins/Ldap_Login/admin/newusers.php +++ /dev/null @@ -1,50 +0,0 @@ -set_filenames( array('plugin_admin_content' => dirname(__FILE__).'/newusers.tpl') ); -$template->assign( - array( - 'PLUGIN_NEWUSERS' => get_root_url().'admin.php?page=plugin-Ldap_Login-newusers', - )); - -$me = new Ldap(); -$me->load_config(); -//$me = get_plugin_data($plugin_id); - -// Save LDAP configuration when submitted -if (isset($_POST['save'])){ - - if (isset($_POST['ALLOW_NEWUSERS'])){ - $me->config['allow_newusers'] = True; - } else { - $me->config['allow_newusers'] = False; - } - - if (isset($_POST['ADVERTISE_ADMINS'])){ - $me->config['advertise_admin_new_ldapuser'] = True; - } else { - $me->config['advertise_admin_new_ldapuser'] = False; - } - - if (isset($_POST['SEND_CASUAL_MAIL'])){ - $me->config['send_password_by_mail_ldap'] = True; - } else { - $me->config['send_password_by_mail_ldap'] = False; - - $me->save_config(); -} - -// do we allow to create new piwigo users in case of auth along the ldap ? -// does he have to belong an ldap group ? -// does ldap groups give some power ? -// what do we do when there's no mail in the ldap ? -// 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'); -?> diff --git a/sources/extra_files/app/plugins/Ldap_Login/admin/newusers.tpl b/sources/extra_files/app/plugins/Ldap_Login/admin/newusers.tpl deleted file mode 100644 index ec9d9a6..0000000 --- a/sources/extra_files/app/plugins/Ldap_Login/admin/newusers.tpl +++ /dev/null @@ -1,54 +0,0 @@ -{literal} - -{/literal} - -