forked from mirror/pixelfed
Update Privacy Settings
This commit is contained in:
parent
23bb12413b
commit
01352e04ea
|
@ -29,14 +29,14 @@ trait PrivacySettings
|
||||||
|
|
||||||
public function privacyStore(Request $request)
|
public function privacyStore(Request $request)
|
||||||
{
|
{
|
||||||
$settings = Auth::user()->settings;
|
$settings = $request->user()->settings;
|
||||||
$profile = Auth::user()->profile;
|
$profile = $request->user()->profile;
|
||||||
$fields = [
|
$fields = [
|
||||||
'is_private',
|
'is_private',
|
||||||
'crawlable',
|
'crawlable',
|
||||||
'show_profile_follower_count',
|
'show_profile_follower_count',
|
||||||
'show_profile_following_count',
|
'show_profile_following_count',
|
||||||
];
|
];
|
||||||
foreach ($fields as $field) {
|
foreach ($fields as $field) {
|
||||||
$form = $request->input($field);
|
$form = $request->input($field);
|
||||||
if ($field == 'is_private') {
|
if ($field == 'is_private') {
|
||||||
|
@ -65,7 +65,7 @@ trait PrivacySettings
|
||||||
}
|
}
|
||||||
$settings->save();
|
$settings->save();
|
||||||
}
|
}
|
||||||
|
Cache::forget('profile:settings:' . $profile->id);
|
||||||
return redirect(route('settings.privacy'))->with('status', 'Settings successfully updated!');
|
return redirect(route('settings.privacy'))->with('status', 'Settings successfully updated!');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue