Révision bc175c27
Ajouté par Assos Assos il y a plus de 5 ans
drupal7/sites/all/modules/ldap/ldap_servers/ldap_servers.module | ||
---|---|---|
1 | 1 |
<?php |
2 | 2 |
|
3 |
/** |
|
4 |
* @file |
|
5 |
*/ |
|
6 |
|
|
3 | 7 |
define('LDAP_SERVER_LDAP_QUERY_CHUNK', 50); |
4 | 8 |
define('LDAP_SERVERS_MAXFILTER_ORS', 30); |
5 | 9 |
define('LDAP_SERVER_LDAP_QUERY_RECURSION_LIMIT', 10); |
... | ... | |
139 | 143 |
define('LDAP_CLIENT_LOOP', 0x60); |
140 | 144 |
define('LDAP_REFERRAL_LIMIT_EXCEEDED', 0x61); |
141 | 145 |
|
142 |
require_once('ldap_servers.functions.inc');
|
|
143 |
require_once('ldap_servers.tokens.inc');
|
|
146 |
module_load_include('inc', 'ldap_servers', 'ldap_servers.functions');
|
|
147 |
module_load_include('inc', 'ldap_servers', 'ldap_servers.tokens');
|
|
144 | 148 |
|
145 | 149 |
/** |
146 | 150 |
* Implements hook_init(). |
147 | 151 |
*/ |
148 | 152 |
function ldap_servers_init() { |
149 |
drupal_add_css(drupal_get_path('module', 'ldap_servers') . '/ldap_servers.admin.css', 'module'); |
|
153 |
if (strpos(current_path(), 'admin/config/people/ldap') === 0) { |
|
154 |
drupal_add_css(drupal_get_path('module', 'ldap_servers') . '/ldap_servers.admin.css', 'module'); |
|
155 |
} |
|
150 | 156 |
} |
151 | 157 |
|
152 | 158 |
/** |
... | ... | |
378 | 384 |
} |
379 | 385 |
} |
380 | 386 |
|
381 |
$available_user_attrs['[field.ldap_user_puid_sid]'] = array(
|
|
387 |
$available_user_attrs['[field.ldap_user_puid_sid]'] = array( |
|
382 | 388 |
'name' => t('Field: sid providing PUID'), |
383 | 389 |
'configurable_to_drupal' => 0, |
384 | 390 |
'configurable_to_ldap' => 1, |
... | ... | |
391 | 397 |
'prov_module' => 'ldap_user', |
392 | 398 |
) + $available_user_attrs['[field.ldap_user_puid_sid]']; |
393 | 399 |
|
394 |
$available_user_attrs['[field.ldap_user_puid]'] = array(
|
|
400 |
$available_user_attrs['[field.ldap_user_puid]'] = array( |
|
395 | 401 |
'name' => t('Field: PUID', $tokens), |
396 | 402 |
'configurable_to_drupal' => 0, |
397 | 403 |
'configurable_to_ldap' => 1, |
... | ... | |
410 | 416 |
'name' => t('Field: PUID Attribute', $tokens), |
411 | 417 |
'configurable_to_drupal' => 0, |
412 | 418 |
'configurable_to_ldap' => 1, |
413 |
'source' => $ldap_server->unique_persistent_attr ,
|
|
419 |
'source' => $ldap_server->unique_persistent_attr , |
|
414 | 420 |
'notes' => 'configure at ' . $server_edit_path, |
415 | 421 |
'direction' => LDAP_USER_PROV_DIRECTION_TO_DRUPAL_USER, |
416 | 422 |
'enabled' => TRUE, |
... | ... | |
455 | 461 |
if (!isset($available_user_attrs['[property.mail]']) || !is_array($available_user_attrs['[property.mail]'])) { |
456 | 462 |
$available_user_attrs['[property.mail]'] = array(); |
457 | 463 |
} |
458 |
$available_user_attrs['[property.mail]'] = array(
|
|
464 |
$available_user_attrs['[property.mail]'] = array( |
|
459 | 465 |
'name' => 'Property: Email', |
460 | 466 |
'source' => ($ldap_server->mail_template) ? $ldap_server->mail_template : '[' . $ldap_server->mail_attr . ']', |
461 | 467 |
'direction' => LDAP_USER_PROV_DIRECTION_TO_DRUPAL_USER, |
... | ... | |
899 | 905 |
|
900 | 906 |
$path = drupal_get_path('module', 'ldap_servers') . '/ldap_types'; |
901 | 907 |
|
902 |
$types['default'] = array(
|
|
908 |
$types['default'] = array( |
|
903 | 909 |
'class' => t('LdapTypeDefault'), |
904 | 910 |
'directory_path' => $path, |
905 | 911 |
'name' => 'Default LDAP', |
906 | 912 |
); |
907 | 913 |
|
908 |
$types['ad'] = array(
|
|
914 |
$types['ad'] = array( |
|
909 | 915 |
'class' => t('LdapTypeActiveDirectory'), |
910 | 916 |
'directory_path' => $path, |
911 | 917 |
'name' => 'Active Directory', |
912 | 918 |
); |
913 | 919 |
|
914 |
$types['novell_edir'] = array(
|
|
920 |
$types['novell_edir'] = array( |
|
915 | 921 |
'class' => t('LdapTypeNovell'), |
916 | 922 |
'directory_path' => $path, |
917 | 923 |
'name' => 'Novell', |
918 | 924 |
); |
919 | 925 |
|
920 |
$types['openldap'] = array(
|
|
926 |
$types['openldap'] = array( |
|
921 | 927 |
'class' => t('LdapTypeOpenLdap'), |
922 | 928 |
'directory_path' => $path, |
923 | 929 |
'name' => 'Open LDAP', |
924 | 930 |
); |
925 | 931 |
|
926 |
$types['opendir'] = array(
|
|
932 |
$types['opendir'] = array( |
|
927 | 933 |
'class' => t('LdapTypeOpenDirectory'), |
928 | 934 |
'directory_path' => $path, |
929 | 935 |
'name' => 'Apple Open Directory', |
Formats disponibles : Unified diff
Weekly update of contrib modules