Reputation: 7340
I am building a custom event handler for the Sitecore security:loggedin event. Basically I want to run some code every time a user logs in. Is it possible for me to get access to the HttpContext (application level variables, etc) from within the event handler code? From what I can tell the only argument that is passed in is the User object for the user that just logged in.
Thanks, Corey
Upvotes: 0
Views: 992
Reputation: 8778
Yes, this is entirely possible:
if (System.Web.HttpContext.Current != null)
{
//do what you like
}
Upvotes: 2