From 98681c51f11211695615df831930817a9ae09b9a Mon Sep 17 00:00:00 2001 From: ATM john Date: Wed, 10 Apr 2019 22:39:30 +0200 Subject: [PATCH 1/2] Fix login dropdown menu no photo --- htdocs/main.inc.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 6355c7e3e7f..ba109ed16cf 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 = ''; From f245247db6b243db302c35eb8d726b9cc6743d8f Mon Sep 17 00:00:00 2001 From: ATM john Date: Wed, 10 Apr 2019 22:43:06 +0200 Subject: [PATCH 2/2] Fix crtl+z and frenetic commit --- htdocs/main.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index ba109ed16cf..740d0f3eb17 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1743,7 +1743,7 @@ function top_menu_user(User $user, Translate $langs) 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'; + $userImage = 'No photo'; $userDropDownImage = 'No photo'; }