Expand my Community achievements bar.

SOLVED

User management Stastics

Avatar

Level 1

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

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

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

View solution in original post

2 Replies

Avatar

Correct answer by
Employee Advisor

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

Avatar

Level 10

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