Explorar o código

WebClient: update password change timestamp after password reset

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
Nicola Murino %!s(int64=2) %!d(string=hai) anos
pai
achega
e0d9b8bddf
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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 {
 	if err == nil {
 		err = resetCodesMgr.Delete(code)
 		err = resetCodesMgr.Delete(code)
 	}
 	}
+	user.LastPasswordChange = util.GetTimeAsMsSinceEpoch(time.Now())
+	user.Filters.RequirePasswordChange = false
 	return &admin, &user, err
 	return &admin, &user, err
 }
 }