mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-10 00:34:50 +00:00
Update HomeSettings controller
This commit is contained in:
parent
f4810360bd
commit
dd91f23b53
1 changed files with 9 additions and 0 deletions
|
@ -47,6 +47,10 @@ trait HomeSettings
|
|||
$email = $request->input('email');
|
||||
$user = Auth::user();
|
||||
$profile = $user->profile;
|
||||
$layout = $request->input('profile_layout');
|
||||
if($layout) {
|
||||
$layout = !in_array($layout, ['metro', 'moment']) ? 'metro' : $layout;
|
||||
}
|
||||
|
||||
$validate = config('pixelfed.enforce_email_verification');
|
||||
|
||||
|
@ -89,6 +93,11 @@ trait HomeSettings
|
|||
$changes = true;
|
||||
$profile->bio = $bio;
|
||||
}
|
||||
|
||||
if ($profile->profile_layout != $layout) {
|
||||
$changes = true;
|
||||
$profile->profile_layout = $layout;
|
||||
}
|
||||
}
|
||||
|
||||
if ($changes === true) {
|
||||
|
|
Loading…
Reference in a new issue