Révision b42754b9
Ajouté par Assos Assos il y a plus de 6 ans
drupal7/sites/all/modules/ldap/ldap_user/ldap_user.install | ||
---|---|---|
522 | 522 |
return $fields_added; |
523 | 523 |
|
524 | 524 |
} |
525 |
|
|
526 |
/** |
|
527 |
* Set an appropriate default value for accountsWithSameEmail. |
|
528 |
*/ |
|
529 |
function ldap_user_update_7206() { |
|
530 |
$message = NULL; |
|
531 |
$ldap_user_conf = ldap_user_conf('admin', TRUE); |
|
532 |
// If the configuration variable is not set, set a reasonable default and |
|
533 |
// advise the administrator. |
|
534 |
if (module_exists('sharedemail')) { |
|
535 |
$message = t('The module "sharedemail" was detected. LDAP User configuration has been set so that user accounts can be provisioned regardless of whether an existing user account has the same email address.'); |
|
536 |
$ldap_user_conf->accountsWithSameEmail = LDAP_USER_ACCOUNTS_WITH_SAME_EMAIL_ENABLED; |
|
537 |
} |
|
538 |
else { |
|
539 |
// The "sharedemail" module is not enabled; do not enable this setting. |
|
540 |
// Do not mention anything in the hook_update_N output. |
|
541 |
$ldap_user_conf->accountsWithSameEmail = LDAP_USER_ACCOUNTS_WITH_SAME_EMAIL_DISABLED; |
|
542 |
} |
|
543 |
$ldap_user_conf->save(); |
|
544 |
|
|
545 |
return $message; |
|
546 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules