Skip to content

Commit

Permalink
Merge pull request #10995 from atm-john/FIX_menu_photo
Browse files Browse the repository at this point in the history
Fix menu photo
  • Loading branch information
eldy committed Apr 11, 2019
2 parents cb08bf6 + f245247 commit ad5b95b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions htdocs/main.inc.php
Expand Up @@ -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 = '';
Expand Down

0 comments on commit ad5b95b

Please sign in to comment.