Try our conversational search powered by Generative AI!

User Strategy - OnAfterLogin Event

Vote:
 

I created a user strategy to capture the OnAfterLogin event. The issue I'm having is that my code is being executed even when a CMS login is not successful, specifically when the username is correct but the password doesn't match. How can I determine if the user login was completely successful? Might Ektron.Cms.Extensibility.CmsEventArgs provide some info? I can't seem to find any documentation that tells me what event info might be present.

I'm using Ektron CMS version 9.10

Regards,

Edward

#182511
Edited, Sep 21, 2017 22:31
Vote:
 
#182512
Sep 21, 2017 22:33
Vote:
 

I found a solution: It looks like the user record has been updated by the time OnAfterLogin fires. By reading the user record via userManager.GetItem and checking for LoginAttempts > 0, I can know if the current login is successful (LoginAttempts = 0) or not (LoginAttempts > 0).

#182518
Sep 22, 2017 0:24
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.