diff --git a/inc/author-helpers.php b/inc/author-helpers.php index bd029fd..5315eb3 100644 --- a/inc/author-helpers.php +++ b/inc/author-helpers.php @@ -141,12 +141,11 @@ function thalim_get_author_data($user_id) { ? 'https://hal.science/search/index/?qa[authIdHal_s][]=' . rawurlencode($hal_id) . '&sort=publicationDate_tdate+desc' : ''; })(), - // Vide tant que le profil n'a pas été enregistré depuis la mise en place - // du suivi (thalim_touch_profile_updated) → ligne « Mis à jour le » masquée. - 'updated_at' => (function() use ($user_id) { - $raw = get_user_meta($user_id, 'thalim_profile_updated', true); - return $raw ? date_i18n('d/m/Y', strtotime($raw)) : ''; - })(), + // Dernière sauvegarde du profil (thalim_touch_profile_updated), à défaut + // la date de création du compte. + 'updated_at' => date_i18n('d/m/Y', strtotime( + get_user_meta($user_id, 'thalim_profile_updated', true) ?: $user->user_registered + )), ]; } diff --git a/templates/author.twig b/templates/author.twig index 44f25a2..7918f8d 100644 --- a/templates/author.twig +++ b/templates/author.twig @@ -31,7 +31,7 @@ {{ author.role_label|esc_html }}{% if author.role_complement %} {{ author.role_complement|esc_html }}{% if author.affiliation %},{% endif %}{% endif %}{% if author.affiliation %} {{ author.affiliation|esc_html }}{% endif %}
{% endif %} - {% if author.updated_at %}{{ current_language == 'en' ? 'Updated on' : 'Mis à jour le' }} {{ author.updated_at }}
{% endif %} +{{ current_language == 'en' ? 'Updated on' : 'Mis à jour le' }} {{ author.updated_at }}
{% endif %} @@ -69,7 +69,7 @@ {{ author.role_label|esc_html }}{% if author.role_complement %} {{ author.role_complement|esc_html }}{% if author.affiliation %},{% endif %}{% endif %}{% if author.affiliation %} {{ author.affiliation|esc_html }}{% endif %} {% endif %} - {% if author.updated_at %}{{ current_language == 'en' ? 'Updated on' : 'Mis à jour le' }} {{ author.updated_at }}
{% endif %} +{{ current_language == 'en' ? 'Updated on' : 'Mis à jour le' }} {{ author.updated_at }}
{% endif %}