Merge pull request #10995 from atm-john/FIX_menu_photo

Fix menu photo
This commit is contained in:
Laurent Destailleur 2019-04-11 16:26:25 +02:00 committed by GitHub
commit ad5b95b912
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1735,8 +1735,16 @@ function top_menu_user(User $user, Translate $langs)
$userImage = $userDropDownImage = '';
if (! empty($user->photo))
{
$userImage = Form::showphoto('userphoto', $user, 0, 0, 0, 'photouserphoto userphoto', 'small', 0, 1);
$userDropDownImage = Form::showphoto('userphoto', $user, 0, 0, 0, 'dropdown-user-image', 'small', 0, 1);
$userImage = Form::showphoto('userphoto', $user, 0, 0, 0, 'photouserphoto userphoto', 'small', 0, 1);
$userDropDownImage = Form::showphoto('userphoto', $user, 0, 0, 0, 'dropdown-user-image', 'small', 0, 1);
}
else{
$nophoto='/public/theme/common/user_anonymous.png';
if ($object->gender == 'man') $nophoto='/public/theme/common/user_man.png';
if ($object->gender == 'woman') $nophoto='/public/theme/common/user_woman.png';
$userImage = '<img class="photo photouserphoto userphoto" alt="No photo" src="'.DOL_URL_ROOT.$nophoto.'">';
$userDropDownImage = '<img class="photo dropdown-user-image" alt="No photo" src="'.DOL_URL_ROOT.$nophoto.'">';
}
$dropdownBody = '';