1
0

Disable the user account after 10 failed password attempts

This commit is contained in:
kolaente
2021-07-29 18:45:22 +02:00
parent 3572ac4b82
commit 5cfc9bf2f9
7 changed files with 122 additions and 10 deletions

View File

@ -67,8 +67,9 @@ func ResetPassword(s *xorm.Session, reset *PasswordReset) (err error) {
return
}
user.Status = StatusActive
_, err = s.
Cols("password").
Cols("password", "status").
Where("id = ?", user.ID).
Update(user)
if err != nil {