diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 6355c7e3e7f..740d0f3eb17 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -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 = 'No photo'; + $userDropDownImage = 'No photo'; } $dropdownBody = '';