mirror of
https://github.com/YunoHost-Apps/pixelfed_ynh.git
synced 2024-09-03 20:06:04 +02: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)
|
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…
Add table
Reference in a new issue