http://onionworks.net/2006/data/personalization

joinGroup (groupReference : xlink) : boolean

The method “joinGroup” adds the user currently logged in to a group. The logged-in user must be the user administrator for this.

If successful, “true” is returned as the return value, otherwise “false”.

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:user="http://onionworks.net/2006/data/personalization" xmlns:onion="http://onionworks.net/2004/data" version="1.0">
<xsl:template match="/">
<xsl:if test="user:login('testuser', 'test')">
<xsl:choose>
<xsl:when test="user:joinGroup('onion://usermanagement/groups/123')"> The user is now in the group 'Editors'. </xsl:when>
<xsl:otherwise>The user could not be added to the group.</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
Adding users to a group