Browse Source

WebClient: update password change timestamp after password reset

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
Nicola Murino 2 years ago
parent
commit
e0d9b8bddf
1 changed files with 2 additions and 0 deletions
  1. 2 0
      internal/httpd/api_utils.go

+ 2 - 0
internal/httpd/api_utils.go

@@ -752,6 +752,8 @@ func handleResetPassword(r *http.Request, code, newPassword string, isAdmin bool
 	if err == nil {
 		err = resetCodesMgr.Delete(code)
 	}
+	user.LastPasswordChange = util.GetTimeAsMsSinceEpoch(time.Now())
+	user.Filters.RequirePasswordChange = false
 	return &admin, &user, err
 }