cogExports users of the wiki in CSV format
Developed by

Thibaut Camberlin

0 Votes
LicenseGNU Lesser General Public License 2.1


Copy / paste this code in a page and you'll be able to download the users of your wiki in CSV format

#if("$!{request.confirm}" == '1')
  #set($ok = $response.setContentType("text/csv"))
  #set($ok = $response.setHeader("Content-disposition", "attachment; filename=export-users.csv"))
  #set ($sql = ", BaseObject as obj where = doc.fullName and obj.className = 'XWiki.XWikiUsers' and <> 'XWiki.XWikiUserTemplate' order by asc")
  #foreach($user in $xwiki.searchDocuments($sql))
    #set($userDoc = $xwiki.getDocument($user))
  * [[Download CSV list of users>>?confirm=1&xpage=plain&outputSyntax=plain]]
  * [[Download CSV list of users (link if xwiki 2.1 syntax)>>||queryString="confirm=1&xpage=plain&outputSyntax=plain"]]

Prerequisites & Installation Instructions

Copy the code snippet to a page and save it.


Get Connected