From f5b75f05e49edd4b8865e4ef8b8650b4e710d957 Mon Sep 17 00:00:00 2001 From: Valentin Le Moign Date: Mon, 12 Oct 2026 14:38:19 +0200 Subject: [PATCH] =?UTF-8?q?Pages=20membres=20:=20=C2=AB=20Mis=20=C3=A0=20j?= =?UTF-8?q?our=20le=20=C2=BB=20toujours=20affich=C3=A9,=20date=20de=20cr?= =?UTF-8?q?=C3=A9ation=20du=20compte=20en=20secours?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit La ligne n'est plus masquée quand le profil n'a pas été réenregistré depuis la mise en place du suivi : on affiche alors user_registered. --- inc/author-helpers.php | 11 +++++------ templates/author.twig | 4 ++-- 2 files changed, 7 insertions(+), 8 deletions(-) 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 %}