Skip to content

Commit

Permalink
Profile images and links to the user profiles are missing in subwikis #…
Browse files Browse the repository at this point in the history
…60

* use the document reference in order to preserve the user namespace
  • Loading branch information
acotiuga committed Nov 11, 2019
1 parent 28d5c91 commit e89d091
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions application-xpoll-ui/src/main/resources/XPoll/XPollSheet.xml
Expand Up @@ -52,21 +52,22 @@
$doc.display('name')
#end
#macro (displayUser $userName)
#set ($user = $xwiki.getDocument($userName))
#set ($userReference = $services.model.resolveDocument($userName))
#set ($user = $xwiki.getDocument($userReference))
{{html wiki='true' clean='false'}}
<div class='clearfix user'>
<span id="avatar_$user.fullName" class='avatar user-avatar-wrapper'>
<span class="user-avatar">
#if ($xwiki.exists($user))
#if ($xwiki.exists($userReference))
{{useravatar username="$user.prefixedFullName" width='40' height='40'/}}
#else
<img alt="Picture of $user.documentReference.name" src="$xwiki.getSkinFile('icons/xwiki/noavatar.png')"
title="$user.documentReference.name" width="40" height="40">
<img alt="Picture of $userReference.name" src="$xwiki.getSkinFile('icons/xwiki/noavatar.png')"
title="$userReference.name" width="40" height="40">
#end
</span>
</span>
<span class='info'>
#if ($xwiki.exists($user))
#if ($xwiki.exists($userReference))
#set ($username = "$!user.getValue('first_name') $!user.getValue('last_name')")
#if ("$!username.trim()" == '')
#set ($username = $user.name)
Expand Down

0 comments on commit e89d091

Please sign in to comment.