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="" xmlns:user="" xmlns:onion="" version="1.0">
<xsl:template match="/">
<xsl:if test="user:login('testuser', 'test')">
<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>
Adding users to a group