[xwiki-users] How can I get the name and last name from the current user in a different variables?
How can I get the name and last name from the current user in a different variables? Until now I obtain the current user with $context.user but I need the name separated from the last name. Thanks
Hi, On Thu, Aug 26, 2010 at 10:28, Francis Abrante <[email protected]> wrote:
How can I get the name and last name from the current user in a different variables? Until now I obtain the current user with $context.user but I need the name separated from the last name. Thanks
You could try: {{velocity}} #set($firstName = $xwiki.getDocument($context.user).getObject('XWiki.XWikiUsers').getProperty('first_name').getValue()) #set($lastName = $xwiki.getDocument($context.user).getObject('XWiki.XWikiUsers').getProperty('last_name').getValue()) $firstName $lastName {{/velocity}} Please document this in a FAQ on XWiki.org if it works for you ;-) Guillaume _______________________________________________
users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
participants (2)
-
Francis Abrante -
Guillaume Lerouge