From e1343692b531f69bc09055dfecf16b69339a3cd7 Mon Sep 17 00:00:00 2001 From: Alex Popa Date: Tue, 3 Dec 2024 17:05:25 +0200 Subject: [PATCH] Edit user email --- app/Filament/Organizations/Resources/UserResource.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Filament/Organizations/Resources/UserResource.php b/app/Filament/Organizations/Resources/UserResource.php index b3b1b03d..33c55cd9 100644 --- a/app/Filament/Organizations/Resources/UserResource.php +++ b/app/Filament/Organizations/Resources/UserResource.php @@ -133,7 +133,8 @@ public static function getSchema(): array ->email() ->unique( ignoreRecord: true, - modifyRuleUsing: fn (Unique $rule) => $rule->whereIn('id', User::getTenantOrganizationUsers()->keys()) + modifyRuleUsing: fn (Unique $rule, string $operation) => $operation === 'edit' ? $rule : + $rule->whereIn('id', User::getTenantOrganizationUsers()->keys()) ) ->required(),