Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jeric Yuen 334 posts 508 karma points
    Jul 08, 2019 @ 14:37
    Jeric Yuen
    0

    Umbraco User Locked Out Event

    Umbraco V7.5.10

    I'm trying to detect the User Locked Out event from the Umbraco Login, was wondering if there's any events I can hooked into similar to

    BackOfficeUserManager.AccountLocked which seems to work with Umbraco V7.7 above

    Thanks

  • David Challener 80 posts 444 karma points c-trib
    Jul 08, 2019 @ 15:02
    David Challener
    0

    Is this package helpful at all https://our.umbraco.com/packages/website-utilities/lockout-membership-provider

    If not, you could do something similar and roll your own membership provider.

    Thanks, David

  • Jeric Yuen 334 posts 508 karma points
    Jul 08, 2019 @ 15:24
    Jeric Yuen
    0

    Looking for the User account locked for the Umbraco Back Office (instead of the membership)

  • Jeric Yuen 334 posts 508 karma points
    Jul 08, 2019 @ 15:37
    Jeric Yuen
    0

    Found it. If anyone needs to know, I've just hooked it to the OnApplicationStarting with the UserService.

    public void OnApplicationStarting(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
        {           
    
            UserService.SavedUser += this.UserServiceSaved;
    
        }
    

    And then

    private void UserServiceSaved(IUserService sender, SaveEventArgs<IUser> e)
        {
            foreach (IUser user in e.SavedEntities)
            {
                //checking if the user is locked out
                if (user.IsLockedOut)
                {
                    //do stuff here like email admin and user
                }
            }
        }
    
  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies