From 2e8385b6d700a038d2b9bf08f2479669a1cba9e4 Mon Sep 17 00:00:00 2001 From: Crypta Electrica Date: Sat, 25 Jan 2025 13:47:16 +1030 Subject: [PATCH] feat: contact email change restart warning --- src/Http/Controllers/Configuration/SeatController.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Http/Controllers/Configuration/SeatController.php b/src/Http/Controllers/Configuration/SeatController.php index b833c44a3..1f4c1b60a 100644 --- a/src/Http/Controllers/Configuration/SeatController.php +++ b/src/Http/Controllers/Configuration/SeatController.php @@ -87,12 +87,18 @@ public function postUpdateSettings(SeatSettings $request) { setting(['registration', $request->registration], true); - setting(['admin_contact', $request->admin_contact], true); setting(['allow_tracking', $request->allow_tracking], true); setting(['cleanup_data', $request->cleanup_data], true); setting(['market_prices_region_id', $request->market_prices_region], true); setting(['allow_user_character_unlink', $request->allow_user_character_unlink], true); + //check if we have changed the admin contact. + if ($request->admin_contact !== setting('admin_contact', true)){ + setting(['admin_contact', $request->admin_contact], true); + return redirect()->back() + ->with('warning', 'SeAT settings updated! Admin Contact has changed, please restart SeAT to apply this change!'); + } + return redirect()->back() ->with('success', 'SeAT settings updated!'); }