From 35725c27181a776d257460dc4f63b0ecfa4596be Mon Sep 17 00:00:00 2001 From: FreeScout Date: Tue, 14 Feb 2023 22:00:06 -0800 Subject: [PATCH] Show extra instructions when invitation email to user can not be sent - #2730 --- app/Http/Controllers/UsersController.php | 6 +++--- public/js/main.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/UsersController.php b/app/Http/Controllers/UsersController.php index 4fb0c9b99..ceaa5df1b 100644 --- a/app/Http/Controllers/UsersController.php +++ b/app/Http/Controllers/UsersController.php @@ -112,7 +112,7 @@ public function createSave(Request $request) $user->sendInvite(true); } catch (\Exception $e) { // Admin is allowed to see exceptions - \Session::flash('flash_error_floating', $e->getMessage()); + \Session::flash('flash_error_floating', $e->getMessage().' — '.__('Check mail settings in "Manage » Settings » Mail Settings"')); } } @@ -390,8 +390,8 @@ public function ajax(Request $request) $response['status'] = 'success'; } catch (\Exception $e) { - // Admin is allowed to see exceptions - $response['msg'] = $e->getMessage(); + // Admin is allowed to see exceptions. + $response['msg'] = $e->getMessage().' — '.__('Check mail settings in "Manage » Settings » Mail Settings"'); } } break; diff --git a/public/js/main.js b/public/js/main.js index a2d9e6323..f9a3e6f0c 100755 --- a/public/js/main.js +++ b/public/js/main.js @@ -3049,7 +3049,7 @@ function userProfileInit() showFloatingAlert('success', Lang.get("messages.invite_sent")); } } else { - showAjaxError(response); + showAjaxError(response, true); } button.button('reset'); },