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:
parent
1d0a1bbf70
commit
b4dd02694a
1 changed files with 3 additions and 0 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Reference in a new issue