Skip to content

Commit

Permalink
Merge pull request #62 from paysysprojects/bugfix-61
Browse files Browse the repository at this point in the history
Use fallback_login_field instead of email in MyProfile
  • Loading branch information
jeffgreco13 authored May 9, 2022
2 parents 79c1d7c + b0af388 commit 6ff8de0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Pages/MyProfile.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ class MyProfile extends Page
public $token_name;
public $abilities = [];
public $plain_text_token;
protected $loginColumn;

public function boot()
{
// user column
$this->loginColumn = config('filament-breezy.fallback_login_field');
}

public function mount()
{
Expand Down Expand Up @@ -53,7 +60,7 @@ protected function getUpdateProfileFormSchema(): array
return [
Forms\Components\TextInput::make("name")
->label(__('filament-breezy::default.fields.name')),
Forms\Components\TextInput::make("email")->unique(ignorable: $this->user)
Forms\Components\TextInput::make($this->loginColumn)->unique(ignorable: $this->user)
->label(__('filament-breezy::default.fields.email')),
];
}
Expand Down

0 comments on commit 6ff8de0

Please sign in to comment.