Add fallback mechanism and logout button on 500 error page to prevent lock in change-password
This commit is contained in:
@@ -229,9 +229,17 @@ class UserController extends Controller
|
||||
/**
|
||||
* Show the change password form.
|
||||
*/
|
||||
public function changePasswordForm(): View
|
||||
public function changePasswordForm()
|
||||
{
|
||||
return view('user.change_password');
|
||||
try {
|
||||
return view('user.change_password');
|
||||
} catch (\Throwable $e) {
|
||||
\Illuminate\Support\Facades\Log::error('Error rendering change_password view: ' . $e->getMessage());
|
||||
return response()->view('errors.500', [
|
||||
'exception' => $e,
|
||||
'allowLogout' => true
|
||||
], 500);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user