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

createUser (username : string, password : string, [role : string]) : xlink

The method “createUser” creates a new user in the user administration. When transferring the parameters roles can be allocated to the user. If several roles are to be allocated to the user, then these can be separated with a comma. The following roles can be selected:

  • editor = Redakteur
  • liveeditor = Live-Redakteur
  • usermanager = Benutzerverwalter
  • schemamanager = Schemaverwalter

If the user is successfully created, the xlink of the produced user will be returned; otherwise the return is empty.

The web application user must be the user administrator in order to execute this method.

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:app="http://onionworks.net/2006/data/application" xmlns:onion="http://onionworks.net/2004/data" version="1.0">
<xsl:template match="/">
<xsl:choose>
<xsl:when test="string-length(app:createUser('testuser2', 'test','editor')) > 0">Der Benutzer wurde erstellt.</xsl:when>
<xsl:otherwise>Der Benutzer konnte nicht erstellt werden.</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
creating new user