User management Stastics | Community
Skip to main content
kinjald72392939
New Participant
October 16, 2015
Solved

User management Stastics

  • October 16, 2015
  • 2 replies
  • 654 views

Hi,

Is there anyway we can track the user logins (statistics) in CQ? I could think of having a filter servlet, but dont know how to configure it for CQ instance itself.

Thanks,

Kinjal

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by joerghoh

If you are using the standard login mechanism and not custom authentication, then on login the token is written to the user node (or a subnode, not sure). You can track such events and then do your statistics.

Jörg

2 replies

joerghoh
joerghohAccepted solution
Employee
October 16, 2015

If you are using the standard login mechanism and not custom authentication, then on login the token is written to the user node (or a subnode, not sure). You can track such events and then do your statistics.

Jörg

smacdonald2008
New Participant
October 16, 2015

You can write a custom authentication handler to perform this task. When the user logs in - you can write Java application logic to perform Stastics/calculations that you want to track. For example - you can determine the last time the user logged in. 

To write a custom authen handler - create a Java class that extends DefaultAuthenticationFeedbackHandler and implements these interfaces:

  • org.apache.sling.auth.core.spi.AuthenticationHandler
  • org.apache.sling.auth.core.spi.AuthenticationFeedbackHandler