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

getCurrentUserReference () : string

The method “getCurrentUserReference” returns an XLink to the user currently logged in. Further information on the user can be retrieved via this XLink. You will find further information in the section “DataViews".

The following example shows the method’s application:

<xsl:stylesheet xmlns:user="http://onionworks.net/2006/data/personalization" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:onion="http://onionworks.net/2004/data" version="1.0">
<xsl:if test="user:login('testuser', 'test')">
<xsl:value-of select="user:getCurrentUserReference()" />
<xsl:value-of select="user:logout()" />
</xsl:if>
</xsl:stylesheet>
Retrieve reference to the logged-in user

The called method produces the following result:

onion://usermanagement/users/5
Result from the example