Jahia in English > How to get logged...

0 (0 Good)
0 (0 Bad)

How to get logged in user's information and taglib's documentation

by  hchingwong@gmail.com »  2016/05/24 15:49

As what the title describes, if I like to get the node or the path of the current user what's the JSP tag I should use?

Also is there some reference material documentation or code that gives some more information on jahia's session object?

 

Thank you~
Wes

  (hchingwong@gmail.com)

Number of messages  7
Registration date
0 (0 Good)
0 (0 Bad)

Re: How to get logged in user's information and taglib's documentation

by  hchingwong@gmail.com »  2016/05/25 08:17

Answering my own question...

Apparently iterating through JSP session variables, headlessly iterating through request/ page objects wasn't the right way, the renderContext bean is what Jahia uses. And after figuring that out, Google gave me the following java docs with no problems, the java docs still seem to apply to 7.1.1.0.

http://downloads.jahia.com/downloads/jahia/jahia6.6.0/jahia-root-6.6.0.0-aggregate-javadoc/org/jahia/services/render/RenderContext.html
http://downloads.jahia.com/downloads/jahia/jahia6.6.0/jahia-root-6.6.0.0-aggregate-javadoc/org/jahia/services/usermanager/JahiaUser.html

Below is how I retreive the logged in user node and the node path:
<c:out value="${renderContext.user.localPath}"/> <br>
<c:out value="${renderContext.user.userKey}"/> <br>

  (hchingwong@gmail.com)

Number of messages  7
Registration date
Contact
Share
Feedback

Get in touch

Whether you are a current user or if you are just evaluating Jahia, we are here to help.

Contact us

Share this page