Virtual Happy Hour is canceled this month (March) due to Good Friday.
Try our conversational search powered by Generative AI!
AI OnAI Off
Virtual Happy Hour is canceled this month (March) due to Good Friday.
Maybe something something like this will work (not tried it myself):
MembershipUser user = System.Web.Security.Membership.GetUser("username");
user.IsApproved = false;
System.Web.Security.Membership.UpdateUser(user);
This probably works in making the account unusable, but it does not set the IsLockedOut property to true. This is what I'm looking for.
I've been trying to figure out a way to block accounts that have not been used for 3 months. I've found a way to check last login date, but I'm having difficulties understanding how to mark the account as locked. I've been looking through the EPiServerProfile, but there is only a way to check if the account IS locked and unlock, not locking it.
Any ideas?