I have an sightly component(.html) from where I am calling a method of my handler. In my handler I want to check userId of the loggedIn user and based on the loggedIn user I want to make that method of handler return values. How can I get the user Id of loggedIn user who is calling this handler. My html is as :
<div data-sly-unwrap data-sly-use.handler="${'com.my.wcm.sightly.handlers.MyHandler'}"> <a href="${handler.linkforloggedinUser}">${handler.linkTitle}</a><br/> </p> </div>
My Handler has simple activate method as its extending WCMUse class. Please suggest any way to get the user in my handler.