You've already forked Atomcms-edit
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:
@@ -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'));
|
||||
|
||||
Reference in New Issue
Block a user