fix(auth): correct tenant code handling in login failure registration

This commit is contained in:
2026-08-11 16:05:37 -03:00
parent 7d9489169d
commit 498b4d9eac
2 changed files with 39 additions and 2 deletions

View File

@@ -159,8 +159,8 @@ class PasswordLoginService
}
if ($user === null || ! Hash::check($password, $user->password)) {
if ($user !== null) {
$this->registerFailure($user, $now, $tenantCode);
if ($user !== null && $attemptTenantCode !== null) {
$this->registerFailure($user, $now, $attemptTenantCode);
}
$outcome = $user?->locked_until?->isFuture()