Login counter

Topics: Administration, Core, Customizing Orchard, General, Troubleshooting
Sep 9, 2012 at 2:29 PM


I'm completely new to Orchard, and I have watched the kickstart videos.

I would like to create a login-counter, where each user in the site has a counter, and it's incremented every time the user logs in. And then add a page where all users login counters are shown, a top-list so to speak.

I thought that "Rules" could be used to accomplished that, however, there seems not to be any "logged in" event. Am I thinking about this the right way, or am I completely off? How would you more senior Orchard users create a login counter?



Sep 9, 2012 at 6:29 PM

If a rule doesn't exist, there is definitely an event handler for it.  IUserEventHandler.  So, if you're up for writing a module, you could implement that interface and intercept when anyone is logging in.  You could even write your own rule provider using the IUserEventHandler if you want.  Hope that gets you on the right track.