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

updatePassword (userReference : xlink, newPassword : string, [oldPassword : string]) : boolean

With the method “updatePassword”, the password of a user can be set. The mandatory parameters “userReference” and “password” specify the user whose password is to be changed and the new password to be set.

When transferring the optional parameter “oldPassword”, it is checked whether it corresponds to the current password before the change is made.

If the password change has not taken place, then the value “false” is returned, otherwise the value “true”.

The web application user must be the user administrator in order to execute this method. Moreover, the web application user may only change the passwords of users who are beneath him in the rights hierarchy.

<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="app:updatePassword('testuser2', 'password', 'test')"> The password was changed successfuly. </xsl:when>
<xsl:otherwise>The password could not be changed.</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
Updating the password