cogLists all the users that have edited a document
Developed by

Sergiu Dumitriu

0 Votes
LicenseGNU Lesser General Public License 2.1

Table of contents


This works with XWiki Platform >= 1.2

Simple and efficient query, but requires programming rights.

#set($targetDoc = $xwiki.getDocument("Main.WebHome"))
  ## Or any other document. Or just use $doc, the current doc.
#set($editors = $
  "select distinct from XWikiRCSNodeInfo rni where = $"))
#foreach($editor in $editors)
* $editor

The same idea, but works without programming rights. A bit slower, as it contains an implicit join with XWikiDocument.

## This works with the current document, $doc, but can be modified as above.
#set($editors = $xwiki.searchDocuments(
  ", XWikiRCSNodeInfo rni where = $ and = doc.fullName"))
#foreach($editor in $editors)
  ## Write a link and a proper name, not just the document name. Can also be used in snippet 1.
* $xwiki.getUserName($editor)

The second snippet works in a single (non-virtual) wiki. When there are virtual wikis involved, things are a bit more difficult, as the author's document might be in another database. Still, it correctly selects all the editors with a local account.

Tags: users

Get Connected