Skip to content

Commit

Permalink
Merge pull request #366 from code4romania/edit-user-email
Browse files Browse the repository at this point in the history
Edit user email
  • Loading branch information
gheorghelupu17 authored Dec 3, 2024
2 parents cee099e + e134369 commit 5c00df6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/Filament/Organizations/Resources/UserResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(),

Expand Down

0 comments on commit 5c00df6

Please sign in to comment.