rawilk / profile-filament-plugin

Profile & MFA starter kit for filament.
https://randallwilk.dev/docs/profile-filament-plugin
MIT License
10 stars 3 forks source link

Prevent accessing email when auth user is null #15

Closed rawilk closed 5 months ago

rawilk commented 5 months ago

As described in #9, there's an edge case where filament is trying to access the authenticated user from our callback function for setting the label on the email input. This will fail once the delete action is called since the authenticated user will be deleted.

Using php's null-safe operator on the authenticated user should prevent this from happening.