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

getCurrentUser () : nodeset

The method getCurrentUser() returns XML with basic informations about the logged in user.

The follwing example show how to use it.

<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('username', 'password')">
<xsl:copy-of select="user:getCurrentUser()" />
<xsl:variable name="logout" select="user:logout()" />
</xsl:if>
</xsl:template>
</xsl:stylesheet>

The example above generates the following output.

<userinfo username="Testuser" id="11" href="onion://usermanagement/users/11" displayName="Test User">
<group>Editors</group>
<group>Publishers</group>
</userinfo>