From d8bd1631610ebf356ee0b231752d3a1b11b1921e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 14 May 2007 23:44:36 +0000 Subject: [PATCH] New: Gestion pleine de l'authentification par LDAP. --- htdocs/conf/conf.php.example | 25 +++++++++++++++++++++++++ htdocs/main.inc.php | 4 +--- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/htdocs/conf/conf.php.example b/htdocs/conf/conf.php.example index 6da28ad77af..24968b6c978 100644 --- a/htdocs/conf/conf.php.example +++ b/htdocs/conf/conf.php.example @@ -93,6 +93,31 @@ $dolibarr_main_db_pass=""; $dolibarr_main_db_type=""; +# dolibarr_main_authentication +# This parameter contains the way authentication is done. +# If value "ldap" is used, you must also set parameters dolibarr_main_auth_ldap_* +# Default: dolibarr +# Possible values: http, dolibarr, ldap +# Examples: +# $dolibarr_main_authentication="http"; +# $dolibarr_main_authentication="dolibarr"; +# $dolibarr_main_authentication="ldap"; +# + + +# Parameters used to setup LDAP authentication. +# Uncomment them if dolibarr_main_authentication = "ldap" +# +# $dolibarr_main_auth_ldap_login_attribute="loginfield"; # uid or samaccountname for active directory +# $dolibarr_main_auth_ldap_host="127.0.0.1"; +# $dolibarr_main_auth_ldap_port="389"; +# $dolibarr_main_auth_ldap_version="3"; +# $dolibarr_main_auth_ldap_dn="ou=adherents,ou=people,dc=parinux,dc=org"; +# $dolibarr_main_auth_ldap_admin_login="" # Required only if anonymous bind disabled +# $dolibarr_main_auth_ldap_admin_pass=""; # Required only if anonymous bind disabled +# $dolibarr_main_auth_ldap_debug="false"; + + # Parameters not used yet $dolibarr_smarty_libs_dir=""; $dolibarr_smarty_compile=""; diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 985fe4d7379..3b76c885f70 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -345,10 +345,8 @@ if (! session_id() || ! isset($_SESSION["dol_login"])) $result=$user->fetch($login); if ($result <= 0) { - //$langs->load('main'); - //dolibarr_print_error($db,$langs->trans("ErrorCantLoadUserFromDolibarrDatabase",$login)); - dolibarr_syslog('ErrorCantLoadUserFromDolibarrDatabase'); session_destroy(); + dolibarr_syslog('User not found, connexion refused'); // On repart sur page accueil session_name($sessionname);