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