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:
@@ -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
|
||||
)),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -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 %}
|
||||
</p>
|
||||
{% 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 %}
|
||||
@@ -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 %}
|
||||
</p>
|
||||
{% 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>
|
||||
{% endif %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user