Fix: A lot of fix on LDAP synchro.
This commit is contained in:
parent
cecc4c0744
commit
babdec527f
@ -18,16 +18,13 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/admin/ldap.php
|
||||
\ingroup ldap
|
||||
\brief Page d'administration/configuration du module Ldap
|
||||
\version $Revision$
|
||||
\version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
|
||||
@ -106,7 +106,7 @@ print '<table class="noborder" width="100%">';
|
||||
$var=true;
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="4">'.$langs->trans("LDAPSynchronizeUsers").'</td>';
|
||||
print '<td colspan="4">'.$langs->trans("LDAPSynchronizeContacts").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
|
||||
@ -98,7 +98,7 @@ print '<table class="noborder" width="100%">';
|
||||
$var=true;
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="4">'.$langs->trans("LDAPSynchronizeUsers").'</td>';
|
||||
print '<td colspan="4">'.$langs->trans("LDAPSynchronizeGroups").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
// DN pour les groupes
|
||||
|
||||
@ -122,7 +122,7 @@ $var=true;
|
||||
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="4">'.$langs->trans("LDAPSynchronizeUsers").'</td>';
|
||||
print '<td colspan="4">'.$langs->trans("LDAPSynchronizeMembers").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
// DN Pour les adherents
|
||||
|
||||
@ -770,7 +770,7 @@ class DolibarrModules
|
||||
{
|
||||
$row = $this->db->fetch_row($result);
|
||||
|
||||
if ($row[0] == 0)
|
||||
if ($row[0] == 0) // If not found
|
||||
{
|
||||
if (! $visible) $visible='0';
|
||||
if (strlen($note))
|
||||
@ -814,6 +814,10 @@ class DolibarrModules
|
||||
$err++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_syslog("DolibarrModules::insert_const constant '".$name."' alreday exists");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -19,23 +19,21 @@
|
||||
*/
|
||||
|
||||
/** \defgroup ldap Module ldap
|
||||
\brief Module pour interfacer les contacts avec un annuaire Ldap
|
||||
\brief Module pour interfacer les contacts avec un annuaire Ldap
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/includes/modules/modLdap.class.php
|
||||
\ingroup ldap
|
||||
\brief Fichier de description et activation du module Ldap
|
||||
\version $Id$
|
||||
* \file htdocs/includes/modules/modLdap.class.php
|
||||
* \ingroup ldap
|
||||
* \brief Fichier de description et activation du module Ldap
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php");
|
||||
|
||||
|
||||
/** \class modLdap
|
||||
\brief Classe de description et activation du module Ldap
|
||||
/** \class modLdap
|
||||
* \brief Classe de description et activation du module Ldap
|
||||
*/
|
||||
|
||||
class modLdap extends DolibarrModules
|
||||
{
|
||||
/**
|
||||
@ -67,63 +65,21 @@ class modLdap extends DolibarrModules
|
||||
$this->requiredby = array();
|
||||
|
||||
// Constants
|
||||
$this->const = array();
|
||||
$r=0;
|
||||
|
||||
$this->const[$r][0] = "LDAP_USER_DN";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "ou=users,dc=my-domain,dc=com";
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "LDAP_GROUP_DN";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "ou=groups,dc=my-domain,dc=com";
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "LDAP_FILTER_CONNECTION";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "&(objectClass=user)(objectCategory=person)";
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "LDAP_FIELD_LOGIN";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "uid";
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "LDAP_FIELD_LOGIN_SAMBA";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "samaccountname";
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "LDAP_FIELD_NAME";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "sn";
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "LDAP_FIELD_FIRSTNAME";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "givenname";
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "LDAP_FIELD_MAIL";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "mail";
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "LDAP_FIELD_PHONE";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "telephonenumber";
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "LDAP_FIELD_FAX";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "facsimiletelephonenumber";
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "LDAP_FIELD_MOBILE";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "mobile";
|
||||
$r++;
|
||||
$this->const = array(
|
||||
0=>array('LDAP_SERVER_TYPE','chaine','openldap','',0),
|
||||
1=>array('LDAP_SERVER_PROTOCOLVERSION','chaine','3','',0),
|
||||
2=>array('LDAP_SERVER_HOST','chaine','localhost','',0),
|
||||
3=>array('LDAP_USER_DN','chaine','ou=users,dc=my-domain,dc=com','',0),
|
||||
4=>array('LDAP_GROUP_DN','chaine','ou=groups,dc=my-domain,dc=com','',0),
|
||||
5=>array('LDAP_FILTER_CONNECTION','chaine','&(objectClass=user)(objectCategory=person)','',0),
|
||||
6=>array('LDAP_FIELD_LOGIN','chaine','uid','',0),
|
||||
7=>array('LDAP_FIELD_NAME','chaine','sn','',0),
|
||||
8=>array('LDAP_FIELD_FIRSTNAME','chaine','givenname','',0),
|
||||
9=>array('LDAP_FIELD_MAIL','chaine','mail','',0),
|
||||
10=>array('LDAP_FIELD_PHONE','chaine','telephonenumber','',0),
|
||||
11=>array('LDAP_FIELD_FAX','chaine','facsimiletelephonenumber','',0),
|
||||
12=>array('LDAP_FIELD_MOBILE','chaine','mobile','',0),
|
||||
);
|
||||
|
||||
// Boites
|
||||
$this->boxes = array();
|
||||
|
||||
@ -810,10 +810,10 @@ LDAPFunctionsNotAvailableOnPHP=LDAP functions are not available on your PHP
|
||||
LDAPToDolibarr=LDAP -> Dolibarr
|
||||
DolibarrToLDAP=Dolibarr -> LDAP
|
||||
LDAPNamingAttribute=Key in LDAP
|
||||
LDAPSynchronizeUsers=Synchronize Dolibarr users with LDAP
|
||||
LDAPSynchronizeGroups=Synchronize Dolibarr groups with LDAP
|
||||
LDAPSynchronizeContacts=Synchronize Dolibarr contacts with LDAP
|
||||
LDAPSynchronizeMembers=Synchronize members of Dolibarr foundation module with LDAP
|
||||
LDAPSynchronizeUsers=Organization of users in LDAP
|
||||
LDAPSynchronizeGroups=Organization of groups in LDAP
|
||||
LDAPSynchronizeContacts=Organization of contacts in LDAP
|
||||
LDAPSynchronizeMembers=Organization of foundation's members in LDAP
|
||||
LDAPTypeExample=OpenLdap, Egroupware or Active Directory
|
||||
LDAPPrimaryServer=Primary server
|
||||
LDAPSecondaryServer=Secondary server
|
||||
|
||||
@ -810,10 +810,10 @@ LDAPFunctionsNotAvailableOnPHP = Les fonctions LDAP ne sont pas disponibles sur
|
||||
LDAPToDolibarr = LDAP -> Dolibarr
|
||||
DolibarrToLDAP = Dolibarr -> LDAP
|
||||
LDAPNamingAttribute = Clé dans LDAP
|
||||
LDAPSynchronizeUsers = Synchronisation des utilisateurs Dolibarr avec LDAP
|
||||
LDAPSynchronizeGroups = Synchronisation des groupes utilisateurs Dolibarr avec LDAP
|
||||
LDAPSynchronizeContacts = Synchronisation des contacts Dolibarr avec LDAP
|
||||
LDAPSynchronizeMembers = Synchronisation des membres du module adhérents de Dolibarr avec LDAP
|
||||
LDAPSynchronizeUsers = Organisation des objets utilisateurs dans le LDAP
|
||||
LDAPSynchronizeGroups = Organisation des objets groupes dans le LDAP
|
||||
LDAPSynchronizeContacts = Organisation des objets contacts dans le LDAP
|
||||
LDAPSynchronizeMembers = Organisation des objets adhérents dans le LDAP
|
||||
LDAPTypeExample = OpenLdap, Egroupware ou Active Directory
|
||||
LDAPPrimaryServer = Serveur primaire
|
||||
LDAPSecondaryServer = Serveur secondaire
|
||||
|
||||
Loading…
Reference in New Issue
Block a user