--- title: Users --- By default, all `App\Models\User`s can access Filament locally. To allow them to access Filament in production, you must take a few extra steps to ensure that only the correct users have access to the admin panel. ## Authorizing access to the admin panel To set up your `App\Models\User` to access Filament in non-local environments, you must implement the `FilamentUser` contract: ```php email, '@yourdomain.com') && $this->hasVerifiedEmail(); } } ``` The `canAccessFilament()` method returns `true` or `false` depending on whether the user is allowed to access Filament. In this example, we check if the user's email ends with `@yourdomain.com` and if they have verified their email address. ## Setting up avatars Out of the box, Filament uses [ui-avatars.com](https://ui-avatars.com) to generate avatars based on a user's name. To provide your own avatar URLs, you can implement the `HasAvatar` contract: ```php avatar_url; } } ``` The `getFilamentAvatarUrl()` method is used to retrieve the avatar of the current user. If `null` is returned from this method, Filament will fall back to [ui-avatars.com](https://ui-avatars.com). ## Configuring the name attribute By default, Filament will use the `name` attribute of the user to display their name in the admin panel. To change this, you can implement the `HasName` contract: ```php first_name} {$this->last_name}"; } } ``` The `getFilamentName()` method is used to retrieve the name of the current user.