login Developer Jahia 7.3 Jahia 8

How to determine is the user is logged in


I need to alter the navigation Login buttons to Logout when the user logs in. How do I do this client side?


There are several ways to determine if a user is logged in.

The easiest way is to use the renderContext.loggedIn function that tests if the current user is a guest or not.

    <c:when test="${renderContext.loggedIn}">
      // link to logout
      // link to login