mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 14:31:26 +00:00
Update Privacy Settings
This commit is contained in:
parent
23bb12413b
commit
01352e04ea
1 changed files with 4 additions and 4 deletions
|
@ -29,14 +29,14 @@ trait PrivacySettings
|
|||
|
||||
public function privacyStore(Request $request)
|
||||
{
|
||||
$settings = Auth::user()->settings;
|
||||
$profile = Auth::user()->profile;
|
||||
$settings = $request->user()->settings;
|
||||
$profile = $request->user()->profile;
|
||||
$fields = [
|
||||
'is_private',
|
||||
'crawlable',
|
||||
'show_profile_follower_count',
|
||||
'show_profile_following_count',
|
||||
];
|
||||
];
|
||||
foreach ($fields as $field) {
|
||||
$form = $request->input($field);
|
||||
if ($field == 'is_private') {
|
||||
|
@ -65,7 +65,7 @@ trait PrivacySettings
|
|||
}
|
||||
$settings->save();
|
||||
}
|
||||
|
||||
Cache::forget('profile:settings:' . $profile->id);
|
||||
return redirect(route('settings.privacy'))->with('status', 'Settings successfully updated!');
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue