Fix FLEXIAPI-133 Use the correct breadcrumb on create and fix a password update related issue on update - 1.4

This commit is contained in:
Timothée Jaussoin 2024-01-23 15:34:07 +00:00
parent 10a29b7420
commit 5b86cc75c9
2 changed files with 5 additions and 2 deletions

View file

@ -345,7 +345,7 @@ class Account extends Authenticatable
return !empty($this->recovery_code) && $this->updated_at->greaterThan($oneHourAgo);
}
public function updatePassword($newPassword, ?string $algorithm = null)
public function updatePassword(string $newPassword, ?string $algorithm = null)
{
$algorithm = $algorithm ?? config('app.account_default_password_algorithm');

View file

@ -136,7 +136,10 @@ class AccountController extends Controller
$account->phone = $request->get('phone');
$account->updatePassword($request->get('password'));
if ($request->get('password')) {
$account->updatePassword($request->get('password'));
}
$account->setRole($request->get('role'));
Log::channel('events')->info('Web Admin: Account updated', ['id' => $account->identifier]);