Medium priority fixes: CORS from env, shared HasRadioSettings trait, lazy RconService, validated() fixes, LogoGenerator hardening, DB indexes, user profile consistency, radio rank N+1 fix

This commit is contained in:
root
2026-06-04 20:05:36 +02:00
parent 4b6872e5e0
commit b2bb1811d0
11 changed files with 140 additions and 56 deletions
@@ -40,13 +40,15 @@ class AccountSettingsController extends Controller
return redirect()->back()->withErrors('User not found');
}
if ($user->mail !== $request->input('mail')) {
$this->userService->updateField($user, 'mail', $request->input('mail'));
$validated = $request->validated();
if ($user->mail !== $validated['mail']) {
$this->userService->updateField($user, 'mail', $validated['mail']);
}
if ($user->motto !== $request->input('motto')) {
$this->rconService->setMotto($user, $request->input('motto'));
$this->userService->updateField($user, 'motto', $request->input('motto'));
if ($user->motto !== $validated['motto']) {
$this->rconService->setMotto($user, $validated['motto']);
$this->userService->updateField($user, 'motto', $validated['motto']);
}
return redirect()->route('settings.account.show')->with('success', __('Your account settings has been updated'));