asp.net mvc 3 reset password by admin and force user to change it

kuzco

New Member
I'm using asp.net Membership, I develop an admin page who can regenerate a temp password to send to the user, then when the user log on for first time, the password must be changed, but I cant figure out who to know if the password was reseted.I tried something like in a base controller:\[code\]if (user.LastPasswordChangedDate >= user.LastLoginDate){ filterContext.Result = RedirectToAction("ChangePassword", "Account");}\[/code\]But, I already have updated the LastLoginDate because the ChangePassword Action need to be with a autenticated user. I was thinking when reseting the password to lock/unlock the user to get updated the "LastLockoutDate" and do:\[code\]if (user.LastPasswordChangedDate >= user.LastLockoutDate){ filterContext.Result = RedirectToAction("ChangePassword", "Account");}\[/code\]But, I can't find a method to do manual lockoutThanks!!!
 
Back
Top