Details
-
Bug
-
Resolution: Won't Fix
-
Major
-
None
-
3.3-rc-1
-
None
-
Unknown
-
Description
In this script:
code
velocity
-
- Max number of contributors to display.
#set ($MAX_CONTRIBUTORS = 5) - We fetch a bit more contributors than needed to include some users that might be ignored.
#set ($FETCHED_CONTRIBUTORS = $MAX_CONTRIBUTORS + 5) - Whether to ignore the main global admin or not.
#set ($IGNORE_GLOBAL_ADMIN = true)
##
#set ($contributors = $xcontext.xWiki.store.search("select ase.user from ActivityEventImpl ase GROUP BY ase.user ORDER BY count DESC", $FETCHED_CONTRIBUTORS, 0, $xcontext.context))
#set ($validContributors = 0)
#foreach ($contributor in $contributors) - It seems that we can have empty users in the table.
- We also ignore superadmin since he 'should not exist'.
- We also ignore the workspace template admin since it's a side-effect of bug http://jira.xwiki.org/jira/browse/XWIKI-6261
- We also ignore a 'ghost' local admin for workspaces since it should no longer exist.
#if ("$!contributor" != '' && !$contributor.endsWith('superadmin') && "$!contributor" != 'workspacetemplate:XWiki.Admin' &&
( !$IGNORE_GLOBAL_ADMIN || ($IGNORE_GLOBAL_ADMIN && "$!contributor" != 'xwiki:XWiki.Admin' ) ) &&
( $xcontext.mainWiki || (!$xcontext.mainWiki && "$!contributor" != 'XWiki.Admin') )
)
#set ($validContributors = $validContributors + 1)
#set ($userDocumentReference = $services.model.resolveDocument($contributor))
#set ($userDocument = $xwiki.getDocument($userDocumentReference))
#set ($userObject = $userDocument.getObject('XWiki.XWikiUser'))
#set ($displayName = "$! {userDocument.getValue('first_name')}$!
{userDocument.getValue('last_name')}")
{contributor}
#set ($displayName = $displayName.trim())
#if ("$!displayName" == '')
#set ($displayName = $userDocumentReference.name)
#end
1. [[$displayName>>$!]]
#end
#if ($validContributors == $MAX_CONTRIBUTORS)
#break
#end
#end
- Max number of contributors to display.
To see the full list of workspace members, you can use the [[User Directory>>Main.UserDirectory]] page.
/velocity
code
The $contributor is a local reference. When displayed in a child wiki the link is bad
Attachments
Issue Links
- is related to
-
XWIKI-9553 Deleted users still appear in the "Top Active Members" list with a broken link
- Closed