dolibarr 19.0.3
modLdap.class.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3 * Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
4 * Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
27include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php';
28
29
34{
40 public function __construct($db)
41 {
42 $this->db = $db;
43 $this->numero = 200;
44
45 $this->family = "interface";
46 // Module position in the family on 2 digits ('01', '10', '20', ...)
47 $this->module_position = '30';
48 // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
49 $this->name = preg_replace('/^mod/i', '', get_class($this));
50 $this->description = "Synchronisation Ldap";
51 // Possible values for version are: 'development', 'experimental', 'dolibarr' or version
52 $this->version = 'dolibarr';
53 $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
54 // Name of image file used for this module.
55 // If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue'
56 // If file is in module/images directory, use this->picto=DOL_URL_ROOT.'/module/images/file.png'
57 $this->picto = 'technic';
58
59 // Data directories to create when module is enabled
60 $this->dirs = array("/ldap/temp");
61
62 // Config pages
63 $this->config_page_url = array("ldap.php");
64
65 // Dependencies
66 $this->hidden = false; // A condition to hide module
67 $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
68 $this->requiredby = array(); // List of module ids to disable if this one is disabled
69 $this->conflictwith = array(); // List of module class names as string this module is in conflict with
70 $this->phpmin = array(7, 0); // Minimum version of PHP required by module
71
72 // Constants
73 $this->const = array(
74 0=>array('LDAP_SERVER_TYPE', 'chaine', 'openldap', '', 0),
75 1=>array('LDAP_SERVER_PROTOCOLVERSION', 'chaine', '3', '', 0),
76 2=>array('LDAP_SERVER_HOST', 'chaine', 'localhost', '', 0),
77 3=>array('LDAP_USER_DN', 'chaine', 'ou=users,dc=example,dc=com', '', 0),
78 4=>array('LDAP_GROUP_DN', 'chaine', 'ou=groups,dc=example,dc=com', '', 0),
79 5=>array('LDAP_FILTER_CONNECTION', 'chaine', '&(objectClass=inetOrgPerson)', '', 0),
80 6=>array('LDAP_FIELD_LOGIN', 'chaine', 'uid', '', 0),
81 7=>array('LDAP_FIELD_FULLNAME', 'chaine', 'cn', '', 0),
82 8=>array('LDAP_FIELD_NAME', 'chaine', 'sn', '', 0),
83 9=>array('LDAP_FIELD_FIRSTNAME', 'chaine', 'givenname', '', 0),
84 10=>array('LDAP_FIELD_MAIL', 'chaine', 'mail', '', 0),
85 11=>array('LDAP_FIELD_PHONE', 'chaine', 'telephonenumber', '', 0),
86 12=>array('LDAP_FIELD_FAX', 'chaine', 'facsimiletelephonenumber', '', 0),
87 13=>array('LDAP_FIELD_MOBILE', 'chaine', 'mobile', '', 0),
88 14=>array('LDAP_GROUP_FILTER', 'chaine', '&(objectClass=groupOfNames)', '', 0),
89 15=>array('LDAP_USERACCOUNTCONTROL', 'int', 512, '', 0),
90 );
91
92 // Boxes
93 $this->boxes = array();
94
95 // Permissions
96 $this->rights = array();
97 $this->rights_class = 'ldap';
98 }
99}
Class DolibarrModules.
Class to describe and enable module Ldap.
__construct($db)
Constructor.
print $script_file $mode $langs defaultlang(is_numeric($duration_value) ? " delay=". $duration_value :"").(is_numeric($duration_value2) ? " after cd cd cd description as description
Only used if Module[ID]Desc translation string is not found.
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition repair.php:124