Hi Allen,

On Mon, Feb 8, 2010 at 6:03 PM, J. Allen Q. Santos <[email protected]> wrote:

> Hi,
>
> how do I manually add a user in XWikiAllGroup using Java Code?
> Thanks in advance.
>

It's the same thing as programatically adding an object to a page and
setting its properties. In velocity you would do:

#set($allgroupdoc = $xwiki.getDocument('XWiki.XWikiAllGroup'))
#set($newuseringroup = $doc.getObject('XWiki.XWikiGroups', true))
$newuseringroup.set('member', 'XWiki.UserName')
$allgroupdoc.save()

Or something similar.

Guillaume



> Allen
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/users
>



-- 
Guillaume Lerouge
Product Manager - XWiki SAS
Skype: wikibc
Twitter: glerouge
http://guillaumelerouge.com/
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to