Copied to clipboard

Flag this post as spam?

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


  • Jamie Townsend 62 posts 287 karma points c-trib
    Aug 31, 2022 @ 17:37
    Jamie Townsend
    0

    Unlock member

    Hi all,

    Trying to unlock a member as part of a reset password process. But I am struggling to find the correct code to do this, previously I did similar to.

    https://our.umbraco.com/forum/using-umbraco-and-getting-started/101003-unlock-member-account-and-reset-failed-login-attempts-after-change-password

    Does anyone know how to do this in v10?

    Many thanks,

  • Jamie Townsend 62 posts 287 karma points c-trib
    Sep 03, 2022 @ 11:08
    Jamie Townsend
    101

    I figured this out and got it working with the following.

    var member = await _memberManager.FindByIdAsync(memberId);
    member.LockoutEnd = DateTimeOffset.Now;
    await _memberManager.UpdateAsync(member); 
    
  • 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