diff --git a/api/types/user.go b/api/types/user.go index 541566c94a2e6..79c1347723eef 100644 --- a/api/types/user.go +++ b/api/types/user.go @@ -434,6 +434,7 @@ func (u *UserV2) SetLocked(until time.Time, reason string) { u.Spec.Status.IsLocked = true u.Spec.Status.LockExpires = until u.Spec.Status.LockedMessage = reason + u.Spec.Status.LockedTime = time.Now().UTC() } // SetRecoveryAttemptLockExpires sets the lock expiry time for both recovery and login attempt.