Reputation: 139
Is there a way to manually unlock a user with the SimpleMembership provider?
if(WebSecurity.IsAccountLockedOut(model.UserName,4,10000)) {
return RedirectToAction("LockedAccount");
}
websecurity.unlockuser(); -> any functions like this
Within the time limit an admin wants to unlock the user account. Is there any possibilities? Can anyone give the correct suggestions?
Upvotes: 0
Views: 733
Reputation: 17540
There is not a method in WebSecurity to unlock the account. But you could try using the SimpleMembershipProvider like this.
var membership = (WebMatrix.WebData.SimpleMembershipProvider)Membership.Provider;
membership.UnlockUser(model.UserName);
Upvotes: 1