Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
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?