Pages membres : « Mis à jour le » toujours affiché, date de création du compte en secours

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.
This commit is contained in:
2026-10-12 14:38:19 +02:00
parent 69d07ec0c0
commit f5b75f05e4
2 changed files with 7 additions and 8 deletions
+5 -6
View File
@@ -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' ? '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 // Dernière sauvegarde du profil (thalim_touch_profile_updated), à défaut
// du suivi (thalim_touch_profile_updated) → ligne « Mis à jour le » masquée. // la date de création du compte.
'updated_at' => (function() use ($user_id) { 'updated_at' => date_i18n('d/m/Y', strtotime(
$raw = get_user_meta($user_id, 'thalim_profile_updated', true); get_user_meta($user_id, 'thalim_profile_updated', true) ?: $user->user_registered
return $raw ? date_i18n('d/m/Y', strtotime($raw)) : ''; )),
})(),
]; ];
} }
+2 -2
View File
@@ -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 %} {{ 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 %}
</p> </p>
{% endif %} {% endif %}
{% if author.updated_at %}<p class="maj">{{ current_language == 'en' ? 'Updated on' : 'Mis à jour le' }} {{ author.updated_at }}</p>{% endif %} <p class="maj">{{ current_language == 'en' ? 'Updated on' : 'Mis à jour le' }} {{ author.updated_at }}</p>
</div> </div>
</div> </div>
{% endif %} {% 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 %} {{ 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 %}
</p> </p>
{% endif %} {% endif %}
{% if author.updated_at %}<p class="maj">{{ current_language == 'en' ? 'Updated on' : 'Mis à jour le' }} {{ author.updated_at }}</p>{% endif %} <p class="maj">{{ current_language == 'en' ? 'Updated on' : 'Mis à jour le' }} {{ author.updated_at }}</p>
</div> </div>
{% endif %} {% endif %}