Friday, January 10, 2014

Getting Liferay Signed in user in XHTML

Check the session is signed in in XHTML
#{facesContext.externalContext.requestMap['THEME_DISPLAY'].signedIn}

Get the signed in user in XHTML
#{facesContext.externalContext.requestMap['THEME_DISPLAY'].user}

Get the signed in user's properties in XHTML
#{facesContext.externalContext.requestMap['THEME_DISPLAY'].fullName}

#{facesContext.externalContext.requestMap['THEME_DISPLAY'].lastLoginDate}

2 comments:

  1. WARNING, this not work for Liferay 6.2, should use the following on the 6.2:
    facesContext.externalContext.requestMap['LIFERAY_SHARED_THEME_DISPLAY']

    ReplyDelete

LinkWithin

Related Posts Plugin for WordPress, Blogger...