FIX : user image was not updated immediately. (#38602)

* FIX : user image was not updated immediately.

* Update card.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
ThomasNgr-OpenDSI 2026-06-04 23:38:11 +02:00 committed by GitHub
parent 1d0a1bbf70
commit b4dd02694a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -558,6 +558,9 @@ if (empty($reshook)) {
$isimage = image_format_supported($_FILES['photo']['name']);
if ($isimage > 0) {
$object->photo = dol_sanitizeFileName($_FILES['photo']['name']);
if ($object->id == $user->id) {
$user->photo = $object->photo;
}
} else {
$error++;
$langs->load("errors");