diff --git a/scripts/contracts/email_expire_services_to_representatives.php b/scripts/contracts/email_expire_services_to_representatives.php index a23bf01d942..43c46c8a1b4 100755 --- a/scripts/contracts/email_expire_services_to_representatives.php +++ b/scripts/contracts/email_expire_services_to_representatives.php @@ -211,7 +211,7 @@ function sendEmailTo($mode, $oldemail, $message, $total, $userlang, $oldtarget, $title = $newlangs->transnoentities("ListOfServicesToExpire"); } - $subject = (!getDolGlobalString('SCRIPT_EMAIL_EXPIRE_SERVICES_SALESREPRESENTATIVES_SUBJECT') ? $title : $conf->global->SCRIPT_EMAIL_EXPIRE_SERVICES_SALESREPRESENTATIVES_SUBJECT); + $subject = getDolGlobalString('SCRIPT_EMAIL_EXPIRE_SERVICES_SALESREPRESENTATIVES_SUBJECT', $title); $sendto = $oldemail; $from = getDolGlobalString('MAIN_MAIL_EMAIL_FROM'); $errorsto = getDolGlobalString('MAIN_MAIL_ERRORS_TO'); diff --git a/scripts/cron/cron_run_jobs.php b/scripts/cron/cron_run_jobs.php index 005c05a1de0..3aa4f601bc1 100755 --- a/scripts/cron/cron_run_jobs.php +++ b/scripts/cron/cron_run_jobs.php @@ -101,7 +101,7 @@ if (!isModEnabled('cron')) { } // Check security key -if ($key != $conf->global->CRON_KEY) { +if ($key != getDolGlobalString('CRON_KEY')) { print "Error: securitykey is wrong\n"; exit(-1); } @@ -142,7 +142,7 @@ if ($result < 0) { } // Reload langs -$langcode = (!getDolGlobalString('MAIN_LANG_DEFAULT') ? 'auto' : $conf->global->MAIN_LANG_DEFAULT); +$langcode = getDolGlobalString('MAIN_LANG_DEFAULT', 'auto'); if (!empty($user->conf->MAIN_LANG_DEFAULT)) { $langcode = $user->conf->MAIN_LANG_DEFAULT; } @@ -224,7 +224,7 @@ if (is_array($object->lines) && (count($object->lines) > 0)) { } // Reload langs - $langcode = (!getDolGlobalString('MAIN_LANG_DEFAULT') ? 'auto' : $conf->global->MAIN_LANG_DEFAULT); + $langcode = getDolGlobalString('MAIN_LANG_DEFAULT', 'auto'); if (!empty($user->conf->MAIN_LANG_DEFAULT)) { $langcode = $user->conf->MAIN_LANG_DEFAULT; } diff --git a/scripts/emailings/mailing-send.php b/scripts/emailings/mailing-send.php index d24b3dfcd15..0e6d655468e 100755 --- a/scripts/emailings/mailing-send.php +++ b/scripts/emailings/mailing-send.php @@ -86,8 +86,8 @@ if (!isModEnabled('mailing')) { @set_time_limit(0); print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n"; -if (getDolGlobalString('MAILING_DELAY')) { - print 'A delay of '.((float) $conf->global->MAILING_DELAY).' seconds has been set between each email'."\n"; +if (getDolGlobalInt('MAILING_DELAY')) { + print 'A delay of '.((float) getDolGlobalInt('MAILING_DELAY')).' seconds has been set between each email'."\n"; } if (getDolGlobalString('MAILING_LIMIT_SENDBYCLI') == '-1') { @@ -153,7 +153,7 @@ if ($resql) { if (getDolGlobalInt('MAILING_LIMIT_SENDBYCLI') > 0 && empty($max)) { $sql2 .= " LIMIT " . getDolGlobalString('MAILING_LIMIT_SENDBYCLI'); } elseif (getDolGlobalInt('MAILING_LIMIT_SENDBYCLI') > 0 && $max > 0) { - $sql2 .= " LIMIT ".min($conf->global->MAILING_LIMIT_SENDBYCLI, $max); + $sql2 .= " LIMIT ".min(getDolGlobalInt('MAILING_LIMIT_SENDBYCLI'), $max); } elseif ($max > 0) { $sql2 .= " LIMIT ".((int) $max); } @@ -383,8 +383,8 @@ if ($resql) { } } - if (getDolGlobalString('MAILING_DELAY')) { - usleep((float) $conf->global->MAILING_DELAY * 1000000); + if (getDolGlobalInt('MAILING_DELAY')) { + usleep((float) getDolGlobalInt('MAILING_DELAY') * 1000000); } } } else { diff --git a/scripts/invoices/email_unpaid_invoices_to_customers.php b/scripts/invoices/email_unpaid_invoices_to_customers.php index 6d51a2bd24a..b9c44faf6b8 100755 --- a/scripts/invoices/email_unpaid_invoices_to_customers.php +++ b/scripts/invoices/email_unpaid_invoices_to_customers.php @@ -250,14 +250,14 @@ function envoi_mail($mode, $oldemail, $message, $total, $userlang, $oldtarget) } $newlangs = new Translate('', $conf); - $newlangs->setDefaultLang(empty($userlang) ? (!getDolGlobalString('MAIN_LANG_DEFAULT') ? 'auto' : $conf->global->MAIN_LANG_DEFAULT) : $userlang); + $newlangs->setDefaultLang(empty($userlang) ? getDolGlobalString('MAIN_LANG_DEFAULT', 'auto') : $userlang); $newlangs->load("main"); $newlangs->load("bills"); - $subject = (!getDolGlobalString('SCRIPT_EMAIL_UNPAID_INVOICES_CUSTOMERS_SUBJECT') ? $newlangs->trans("ListOfYourUnpaidInvoices") : $conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_CUSTOMERS_SUBJECT); + $subject = getDolGlobalString('SCRIPT_EMAIL_UNPAID_INVOICES_CUSTOMERS_SUBJECT', $newlangs->trans("ListOfYourUnpaidInvoices")); $sendto = $oldemail; - $from = !getDolGlobalString('MAIN_MAIL_EMAIL_FROM') ? '' : $conf->global->MAIN_MAIL_EMAIL_FROM; - $errorsto = !getDolGlobalString('MAIN_MAIL_ERRORS_TO') ? '' : $conf->global->MAIN_MAIL_ERRORS_TO; + $from = getDolGlobalString('MAIN_MAIL_EMAIL_FROM'); + $errorsto = getDolGlobalString('MAIN_MAIL_ERRORS_TO'); $msgishtml = -1; print "- Send email to '".$oldtarget."' (".$oldemail."), total: ".$total."\n"; @@ -282,8 +282,8 @@ function envoi_mail($mode, $oldemail, $message, $total, $userlang, $oldtarget) $allmessage .= $message.($usehtml ? "
\n" : "\n"); $allmessage .= $langs->trans("Total")." = ".price($total, 0, $userlang, 0, 0, -1, $conf->currency).($usehtml ? "
\n" : "\n"); if (getDolGlobalString('SCRIPT_EMAIL_UNPAID_INVOICES_CUSTOMERS_FOOTER')) { - $allmessage .= $conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_CUSTOMERS_FOOTER; - if (dol_textishtml($conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_CUSTOMERS_FOOTER)) { + $allmessage .= getDolGlobalString('SCRIPT_EMAIL_UNPAID_INVOICES_CUSTOMERS_FOOTER'); + if (dol_textishtml(getDolGlobalString('SCRIPT_EMAIL_UNPAID_INVOICES_CUSTOMERS_FOOTER'))) { $usehtml += 1; } } diff --git a/scripts/invoices/email_unpaid_invoices_to_representatives.php b/scripts/invoices/email_unpaid_invoices_to_representatives.php index 058966e6a2b..7336f2be259 100755 --- a/scripts/invoices/email_unpaid_invoices_to_representatives.php +++ b/scripts/invoices/email_unpaid_invoices_to_representatives.php @@ -206,14 +206,14 @@ function envoi_mail($mode, $oldemail, $message, $total, $userlang, $oldtarget) } $newlangs = new Translate('', $conf); - $newlangs->setDefaultLang(empty($userlang) ? (!getDolGlobalString('MAIN_LANG_DEFAULT') ? 'auto' : $conf->global->MAIN_LANG_DEFAULT) : $userlang); + $newlangs->setDefaultLang(empty($userlang) ? getDolGlobalString('MAIN_LANG_DEFAULT', 'auto') : $userlang); $newlangs->load("main"); $newlangs->load("bills"); - $subject = (!getDolGlobalString('SCRIPT_EMAIL_UNPAID_INVOICES_SALESREPRESENTATIVES_SUBJECT') ? $newlangs->trans("ListOfYourUnpaidInvoices") : $conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_SALESREPRESENTATIVES_SUBJECT); + $subject = getDolGlobalString('SCRIPT_EMAIL_UNPAID_INVOICES_SALESREPRESENTATIVES_SUBJECT', $newlangs->trans("ListOfYourUnpaidInvoices")); $sendto = $oldemail; - $from = !getDolGlobalString('MAIN_MAIL_EMAIL_FROM') ? '' : $conf->global->MAIN_MAIL_EMAIL_FROM; - $errorsto = !getDolGlobalString('MAIN_MAIL_ERRORS_TO') ? '' : $conf->global->MAIN_MAIL_ERRORS_TO; + $from = getDolGlobalString('MAIN_MAIL_EMAIL_FROM'); + $errorsto = getDolGlobalString('MAIN_MAIL_ERRORS_TO'); $msgishtml = -1; print "- Send email for ".$oldtarget." (".$oldemail."), total: ".$total."\n"; @@ -237,8 +237,8 @@ function envoi_mail($mode, $oldemail, $message, $total, $userlang, $oldtarget) $allmessage .= $message.($usehtml ? "
\n" : "\n"); $allmessage .= $langs->trans("Total")." = ".price($total, 0, $newlangs, 0, 0, -1, $conf->currency).($usehtml ? "
\n" : "\n"); if (getDolGlobalString('SCRIPT_EMAIL_UNPAID_INVOICES_SALESREPRESENTATIVES_FOOTER')) { - $allmessage .= $conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_SALESREPRESENTATIVES_FOOTER; - if (dol_textishtml($conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_SALESREPRESENTATIVES_FOOTER)) { + $allmessage .= getDolGlobalString('SCRIPT_EMAIL_UNPAID_INVOICES_SALESREPRESENTATIVES_FOOTER'); + if (dol_textishtml(getDolGlobalString('SCRIPT_EMAIL_UNPAID_INVOICES_SALESREPRESENTATIVES_FOOTER'))) { $usehtml += 1; } } diff --git a/scripts/members/sync_members_dolibarr2ldap.php b/scripts/members/sync_members_dolibarr2ldap.php index dbeef136368..ae01a088393 100755 --- a/scripts/members/sync_members_dolibarr2ldap.php +++ b/scripts/members/sync_members_dolibarr2ldap.php @@ -90,7 +90,7 @@ print "----- To LDAP database:\n"; print "host=" . getDolGlobalString('LDAP_SERVER_HOST')."\n"; print "port=" . getDolGlobalString('LDAP_SERVER_PORT')."\n"; print "login=" . getDolGlobalString('LDAP_ADMIN_DN')."\n"; -print "pass=".preg_replace('/./i', '*', $conf->global->LDAP_ADMIN_PASS)."\n"; +print "pass=".preg_replace('/./i', '*', getDolGlobalString('LDAP_ADMIN_PASS'))."\n"; print "DN target=" . getDolGlobalString('LDAP_MEMBER_DN')."\n"; print "\n"; @@ -104,8 +104,7 @@ if (!$confirmed) { } /* - * if (! $conf->global->LDAP_MEMBER_ACTIVE) - * { + * if (getDolGlobalString('LDAP_MEMBER_ACTIVE') { * print $langs->trans("LDAPSynchronizationNotSetupInDolibarr"); * exit(-1); * } diff --git a/scripts/members/sync_members_ldap2dolibarr.php b/scripts/members/sync_members_ldap2dolibarr.php index d0496c9d7c0..b8bbabe5060 100755 --- a/scripts/members/sync_members_ldap2dolibarr.php +++ b/scripts/members/sync_members_ldap2dolibarr.php @@ -118,7 +118,7 @@ print "----- Synchronize all records from LDAP database:\n"; print "host=" . getDolGlobalString('LDAP_SERVER_HOST')."\n"; print "port=" . getDolGlobalString('LDAP_SERVER_PORT')."\n"; print "login=" . getDolGlobalString('LDAP_ADMIN_DN')."\n"; -print "pass=".preg_replace('/./i', '*', $conf->global->LDAP_ADMIN_PASS)."\n"; +print "pass=".preg_replace('/./i', '*', getDolGlobalString('LDAP_ADMIN_PASS'))."\n"; print "DN to extract=" . getDolGlobalString('LDAP_MEMBER_DN')."\n"; if (getDolGlobalString('LDAP_MEMBER_FILTER')) { print 'Filter=(' . getDolGlobalString('LDAP_MEMBER_FILTER').')'."\n"; // Note: filter is defined into function getRecords @@ -192,7 +192,7 @@ if ($result >= 0) { // We disable synchro Dolibarr-LDAP $conf->global->LDAP_MEMBER_ACTIVE = 0; - $ldaprecords = $ldap->getRecords('*', $conf->global->LDAP_MEMBER_DN, $conf->global->LDAP_KEY_MEMBERS, $required_fields, 'member'); // Fiter on 'member' filter param + $ldaprecords = $ldap->getRecords('*', getDolGlobalString('LDAP_MEMBER_DN'), getDolGlobalString('LDAP_KEY_MEMBERS'), $required_fields, 'member'); // Fiter on 'member' filter param if (is_array($ldaprecords)) { $db->begin(); diff --git a/scripts/members/sync_members_types_dolibarr2ldap.php b/scripts/members/sync_members_types_dolibarr2ldap.php index 3ec2c9d0d90..5fd145e0926 100755 --- a/scripts/members/sync_members_types_dolibarr2ldap.php +++ b/scripts/members/sync_members_types_dolibarr2ldap.php @@ -63,8 +63,7 @@ print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n"; dol_syslog($script_file." launched with arg ".join(',', $argv)); /* - * if (! $conf->global->LDAP_SYNCHRO_ACTIVE) - * { + * if (getDolGlobalString('LDAP_SYNCHRO_ACTIVE')) { * print $langs->trans("LDAPSynchronizationNotSetupInDolibarr"); * exit(-1); * } diff --git a/scripts/members/sync_members_types_ldap2dolibarr.php b/scripts/members/sync_members_types_ldap2dolibarr.php index a31d5a3c30c..eeaf1134613 100755 --- a/scripts/members/sync_members_types_ldap2dolibarr.php +++ b/scripts/members/sync_members_types_ldap2dolibarr.php @@ -100,7 +100,7 @@ print "----- Synchronize all records from LDAP database:\n"; print "host=" . getDolGlobalString('LDAP_SERVER_HOST')."\n"; print "port=" . getDolGlobalString('LDAP_SERVER_PORT')."\n"; print "login=" . getDolGlobalString('LDAP_ADMIN_DN')."\n"; -print "pass=".preg_replace('/./i', '*', $conf->global->LDAP_ADMIN_PASS)."\n"; +print "pass=".preg_replace('/./i', '*', getDolGlobalString('LDAP_ADMIN_PASS'))."\n"; print "DN to extract=" . getDolGlobalString('LDAP_MEMBER_TYPE_DN')."\n"; print 'Filter=(' . getDolGlobalString('LDAP_KEY_MEMBERS_TYPES').'=*)'."\n"; print "----- To Dolibarr database:\n"; @@ -132,7 +132,7 @@ if ($result >= 0) { // We disable synchro Dolibarr-LDAP $conf->global->LDAP_MEMBER_TYPE_ACTIVE = 0; - $ldaprecords = $ldap->getRecords('*', $conf->global->LDAP_MEMBER_TYPE_DN, $conf->global->LDAP_KEY_MEMBERS_TYPES, $required_fields, 0, array($conf->global->LDAP_MEMBER_TYPE_FIELD_GROUPMEMBERS)); + $ldaprecords = $ldap->getRecords('*', getDolGlobalString('LDAP_MEMBER_TYPE_DN'), getDolGlobalString('LDAP_KEY_MEMBERS_TYPES'), $required_fields, 0, array($conf->global->LDAP_MEMBER_TYPE_FIELD_GROUPMEMBERS)); if (is_array($ldaprecords)) { $db->begin(); diff --git a/scripts/user/sync_groups_dolibarr2ldap.php b/scripts/user/sync_groups_dolibarr2ldap.php index 7d9ed2f307e..2c37c96dd4e 100755 --- a/scripts/user/sync_groups_dolibarr2ldap.php +++ b/scripts/user/sync_groups_dolibarr2ldap.php @@ -61,8 +61,7 @@ print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n"; dol_syslog($script_file." launched with arg ".join(',', $argv)); /* - * if (! $conf->global->LDAP_SYNCHRO_ACTIVE) - * { + * if (getDolGlobalString('LDAP_SYNCHRO_ACTIVE')) { * print $langs->trans("LDAPSynchronizationNotSetupInDolibarr"); * exit(-1); * } diff --git a/scripts/user/sync_groups_ldap2dolibarr.php b/scripts/user/sync_groups_ldap2dolibarr.php index fd718d132d0..e221e06b378 100755 --- a/scripts/user/sync_groups_ldap2dolibarr.php +++ b/scripts/user/sync_groups_ldap2dolibarr.php @@ -62,7 +62,7 @@ print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n"; dol_syslog($script_file." launched with arg ".join(',', $argv)); // List of fields to get from LDAP -$required_fields = array($conf->global->LDAP_KEY_GROUPS, $conf->global->LDAP_GROUP_FIELD_FULLNAME, $conf->global->LDAP_GROUP_FIELD_DESCRIPTION, $conf->global->LDAP_GROUP_FIELD_GROUPMEMBERS); +$required_fields = array(getDolGlobalString('LDAP_KEY_GROUPS'), getDolGlobalString('LDAP_GROUP_FIELD_FULLNAME'), getDolGlobalString('LDAP_GROUP_FIELD_DESCRIPTION'), getDolGlobalString('LDAP_GROUP_FIELD_GROUPMEMBERS')); // Remove from required_fields all entries not configured in LDAP (empty) and duplicated $required_fields = array_unique(array_values(array_filter($required_fields, "dolValidElement"))); @@ -95,7 +95,7 @@ print "----- Synchronize all records from LDAP database:\n"; print "host=" . getDolGlobalString('LDAP_SERVER_HOST')."\n"; print "port=" . getDolGlobalString('LDAP_SERVER_PORT')."\n"; print "login=" . getDolGlobalString('LDAP_ADMIN_DN')."\n"; -print "pass=".preg_replace('/./i', '*', $conf->global->LDAP_ADMIN_PASS)."\n"; +print "pass=".preg_replace('/./i', '*', getDolGlobalString('LDAP_ADMIN_PASS'))."\n"; print "DN to extract=" . getDolGlobalString('LDAP_GROUP_DN')."\n"; if (getDolGlobalString('LDAP_GROUP_FILTER')) { print 'Filter=(' . getDolGlobalString('LDAP_GROUP_FILTER').')'."\n"; // Note: filter is defined into function getRecords diff --git a/scripts/user/sync_users_dolibarr2ldap.php b/scripts/user/sync_users_dolibarr2ldap.php index abe0b9fbcf4..6ecad166ca1 100755 --- a/scripts/user/sync_users_dolibarr2ldap.php +++ b/scripts/user/sync_users_dolibarr2ldap.php @@ -61,8 +61,7 @@ print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n"; dol_syslog($script_file." launched with arg ".join(',', $argv)); /* - * if (! $conf->global->LDAP_SYNCHRO_ACTIVE) - * { + * if (! getDolGlobalString('LDAP_SYNCHRO_ACTIVE')) { * print $langs->trans("LDAPSynchronizationNotSetupInDolibarr"); * exit(-1); * } diff --git a/scripts/user/sync_users_ldap2dolibarr.php b/scripts/user/sync_users_ldap2dolibarr.php index 98c6a3b5519..2fa35556c8d 100755 --- a/scripts/user/sync_users_ldap2dolibarr.php +++ b/scripts/user/sync_users_ldap2dolibarr.php @@ -113,7 +113,7 @@ print "----- Synchronize all records from LDAP database:\n"; print "host=" . getDolGlobalString('LDAP_SERVER_HOST')."\n"; print "port=" . getDolGlobalString('LDAP_SERVER_PORT')."\n"; print "login=" . getDolGlobalString('LDAP_ADMIN_DN')."\n"; -print "pass=".preg_replace('/./i', '*', $conf->global->LDAP_ADMIN_PASS)."\n"; +print "pass=".preg_replace('/./i', '*', getDolGlobalString('LDAP_ADMIN_PASS'))."\n"; print "DN to extract=" . getDolGlobalString('LDAP_USER_DN')."\n"; if (getDolGlobalString('LDAP_FILTER_CONNECTION')) { print 'Filter=(' . getDolGlobalString('LDAP_FILTER_CONNECTION').')'."\n"; // Note: filter is defined into function getRecords @@ -177,7 +177,7 @@ if ($result >= 0) { // We disable synchro Dolibarr-LDAP $conf->global->LDAP_SYNCHRO_ACTIVE = 0; - $ldaprecords = $ldap->getRecords('*', $conf->global->LDAP_USER_DN, $conf->global->LDAP_KEY_USERS, $required_fields, 'user'); // Fiter on 'user' filter param + $ldaprecords = $ldap->getRecords('*', getDolGlobalString('LDAP_USER_DN'), getDolGlobalString('LDAP_KEY_USERS'), $required_fields, 'user'); // Fiter on 'user' filter param if (is_array($ldaprecords)) { $db->begin(); @@ -191,9 +191,9 @@ if ($result >= 0) { $fuser = new User($db); - if ($conf->global->LDAP_KEY_USERS == $conf->global->LDAP_FIELD_SID) { + if (getDolGlobalString('LDAP_KEY_USERS') == getDolGlobalString('LDAP_FIELD_SID')) { $fuser->fetch('', '', $ldapuser[getDolGlobalString('LDAP_KEY_USERS')]); // Chargement du user concerné par le SID - } elseif ($conf->global->LDAP_KEY_USERS == $conf->global->LDAP_FIELD_LOGIN) { + } elseif (getDolGlobalString('LDAP_KEY_USERS') == getDolGlobalString('LDAP_FIELD_LOGIN')) { $fuser->fetch('', $ldapuser[getDolGlobalString('LDAP_KEY_USERS')]); // Chargement du user concerné par le login } @@ -206,10 +206,10 @@ if ($result >= 0) { // $user->societe; /* - * $fuser->address=$ldapuser[$conf->global->LDAP_FIELD_ADDRESS]; - * $fuser->zip=$ldapuser[$conf->global->LDAP_FIELD_ZIP]; - * $fuser->town=$ldapuser[$conf->global->LDAP_FIELD_TOWN]; - * $fuser->country=$ldapuser[$conf->global->LDAP_FIELD_COUNTRY]; + * $fuser->address=$ldapuser[getDolGlobalString('LDAP_FIELD_ADDRESS')]; + * $fuser->zip=$ldapuser[getDolGlobalString('LDAP_FIELD_ZIP')]; + * $fuser->town=$ldapuser[getDolGlobalString('LDAP_FIELD_TOWN')]; + * $fuser->country=$ldapuser[getDolGlobalString('LDAP_FIELD_COUNTRY')]; * $fuser->country_id=$countries[$hashlib2rowid[strtolower($fuser->country)]]['rowid']; * $fuser->country_code=$countries[$hashlib2rowid[strtolower($fuser->country)]]['code']; */ @@ -230,8 +230,7 @@ if ($result >= 0) { $fuser->statut = 1; // TODO : revoir la gestion du status /* - * if (isset($ldapuser[$conf->global->LDAP_FIELD_MEMBER_STATUS])) - * { + * if (isset($ldapuser[getDolGlobalString('LDAP_FIELD_MEMBER_STATUS')])) { * $fuser->datec=dol_stringtotime($ldapuser[$conf->global->LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_DATE]); * $fuser->datevalid=dol_stringtotime($ldapuser[$conf->global->LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_DATE]); * $fuser->statut=$ldapuser[$conf->global->LDAP_FIELD_MEMBER_STATUS]; @@ -269,7 +268,7 @@ if ($result >= 0) { // TODO : revoir la gestion des groupes (ou script de sync groupes) /* * if(!$error) { - * foreach ($ldapuser[$conf->global->LDAP_FIELD_USERGROUPS] as $groupdn) { + * foreach ($ldapuser[getDolGlobalString('LDAP_FIELD_USERGROUPS') as $groupdn) { * $groupdn; * } * }