mirror of
https://gitlab.linphone.org/BC/public/flexisip-account-manager.git
synced 2026-01-17 01:58:07 +00:00
Fix FLEXIAPI-401 Use a Space scoped reset password URL
This commit is contained in:
parent
689140a553
commit
ed28e8fe55
2 changed files with 13 additions and 1 deletions
|
|
@ -276,6 +276,18 @@ class Account extends Authenticatable
|
|||
return $this->hasMany(AuthToken::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset password
|
||||
*/
|
||||
|
||||
public function getCurrentResetPasswordUrlAttribute(): string
|
||||
{
|
||||
return replaceHost(
|
||||
route('account.reset_password_email.change', $this->currentResetPasswordEmailToken->token),
|
||||
$this->space->host
|
||||
);
|
||||
}
|
||||
|
||||
public function currentResetPasswordEmailToken()
|
||||
{
|
||||
return $this->hasOne(ResetPasswordEmailToken::class)->where('used', false)->latestOfMany();
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
{{ __('Click the button below to choose a new password:') }}
|
||||
|
||||
[{{ __('Reset my password') }}]({{ route('account.reset_password_email.change', $account->currentResetPasswordEmailToken->token) }})
|
||||
[{{ __('Reset my password') }}]({{ $account->currentResetPasswordUrl }})
|
||||
|
||||
{{ __('This link will expire in :hour hours.', ['hour' => config('app.reset_password_email_token_expiration_minutes')/60 ]) }}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue