diff --git a/htdocs/adherents/adherent.class.php b/htdocs/adherents/adherent.class.php index dcc2e1dd518..f9d2de6b24b 100644 --- a/htdocs/adherents/adherent.class.php +++ b/htdocs/adherents/adherent.class.php @@ -1929,6 +1929,9 @@ class Adherent $this->public=1; $this->statut=1; + $this->datefin=time(); + $this->datevalid=time(); + $this->typeid=1; // Id type adherent $this->type='Type adherent'; // Libellé type adherent $this->need_subscription=0; @@ -1991,6 +1994,7 @@ class Adherent if ($this->commentaire && $conf->global->LDAP_FIELD_DESCRIPTION) $info[$conf->global->LDAP_FIELD_DESCRIPTION] = $this->commentaire; if ($this->naiss && $conf->global->LDAP_FIELD_BIRTHDATE) $info[$conf->global->LDAP_FIELD_BIRTHDATE] = dolibarr_print_date($this->naiss,'dayhourldap'); if ($this->statut && $conf->global->LDAP_FIELD_MEMBER_STATUS) $info[$conf->global->LDAP_FIELD_MEMBER_STATUS] = $this->statut; + if ($this->datefin && $conf->global->LDAP_FIELD_MEMBER_END_LASTSUBSCRIPTION) $info[$conf->global->LDAP_FIELD_MEMBER_END_LASTSUBSCRIPTION] = dolibarr_print_date($this->datefin,'dayhourldap'); // Subscriptions if ($this->firstsubscription_date && $conf->global->LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_DATE) $info[$conf->global->LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_DATE] = dolibarr_print_date($this->firstsubscription_date,'dayhourldap'); diff --git a/htdocs/admin/ldap_members.php b/htdocs/admin/ldap_members.php index 6eb1bbd4852..873ccd6b460 100644 --- a/htdocs/admin/ldap_members.php +++ b/htdocs/admin/ldap_members.php @@ -72,6 +72,7 @@ if ($_GET["action"] == 'setvalue' && $user->admin) if (! dolibarr_set_const($db, 'LDAP_FIELD_DESCRIPTION',$_POST["fielddescription"])) $error++; if (! dolibarr_set_const($db, 'LDAP_FIELD_BIRTHDATE',$_POST["fieldbirthdate"])) $error++; if (! dolibarr_set_const($db, 'LDAP_FIELD_MEMBER_STATUS',$_POST["fieldstatus"])) $error++; + if (! dolibarr_set_const($db, 'LDAP_FIELD_MEMBER_END_LASTSUBSCRIPTION', $_POST["fieldendlastsubscription"])) $error++; // Subscriptions if (! dolibarr_set_const($db, 'LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_DATE', $_POST["fieldfirstsubscriptiondate"])) $error++; @@ -343,6 +344,14 @@ print ' '; print ' '; print ''; +// End last subscriptions +$var=!$var; +print ''.$langs->trans("LDAPFieldEndLastSubscription").''; +print ''; +print ' '; +print ' '; +print ''; + $var=!$var; print ''; print ''; diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index d74c3a5002e..07e804be908 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -634,6 +634,7 @@ LDAPFieldBirthdate=Birthdate LDAPFieldBirthdateExample=Exemple : LDAPFieldSid=SID LDAPFieldSidExample=Example : objectsid +LDAPFieldEndLastSubscription=Date of subscription end LDAPParametersAreStillHardCoded=LDAP parametres are still hardcoded (in contact class) LDAPSetupNotComplete=LDAP setup not complete (go on others tabs) LDAPNoUserOrPasswordProvidedAccessIsReadOnly=No administrator or password provided. LDAP access will be anonymous and in read only mode. diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index d41851f9222..abc8ec1984d 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -635,6 +635,7 @@ LDAPFieldBirthdate=Date de naissance LDAPFieldBirthdateExample=Exemple : LDAPFieldSid=SID LDAPFieldSidExample=Exemple : objectsid +LDAPFieldEndLastSubscription=Date fin validité adhésion LDAPParametersAreStillHardCoded=Les parametres LDAP sont codés en dur (dans classe contact) LDAPSetupNotComplete=Configuration LDAP incomplète (à compléter sur les autres onglets) LDAPNoUserOrPasswordProvidedAccessIsReadOnly=Administrateur ou mot de passe non renseigné. Les accès LDAP seront donc anonymes et en lecture seule.