fix(user): update hidden attributes and handle soft-deleted users in registration

This commit is contained in:
2026-09-03 10:31:43 -03:00
parent 0baad641d5
commit eda2343380
4 changed files with 65 additions and 2 deletions

View File

@@ -104,7 +104,10 @@ class InvitationPurchaseProvisioner
private function userId(DateTimeInterface $now): int
{
$user = DB::table('users')->where('email', self::USER_EMAIL)->first();
$user = DB::table('users')
->where('email', self::USER_EMAIL)
->whereNull('deleted_at')
->first();
if ($user !== null) {
if ($user->tenant_codigo !== self::TENANT_CODE) {