groupFixes the XWikiAllGroup by synchronizing it with real users in the wiki
Developed by


0 Votes
LicenseGNU Lesser General Public License 2.1


Recreates the XWiki.XWikiAllGroup page with all existing users added to it. This can be useful for the case when you accidentally delete or overwrite XWikiAllGroup (such as when you do a XAR import and overwrite it by mistake).

Add the following in a document in the XWiki Syntax 2.1:

#set ($allGroupDoc = $xwiki.getDocument('XWiki.XWikiAllGroup'))
#foreach ($userDocName in $xwiki.searchDocuments(', BaseObject as obj where obj.className=''XWiki.XWikiUsers'' and'))
  #if (!$allGroupDoc.getObject('XWiki.XWikiGroups', 'member', $userDocName))
    #set ($member = $allGroupDoc.newObject('XWiki.XWikiGroups'))
    $!member.set('member', $userDocName)
   * Restoring user [[$userDocName]] in XWikiAllGroup
#if ("$!{request.confirm}" == '1')
 [[Confirm these changes?>>$doc||queryString="confirm=1"]]

Prerequisites & Installation Instructions

Copy the code snippet to a page and save it.

Created by JeromeVelociter on 2009/02/13 12:32

Get Connected