From c7ed684a5c0488d3501a23e9c5101a35baa17af0 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 11 Jan 2024 06:31:19 -0700 Subject: [PATCH] Update ParentalControlsController --- app/Http/Controllers/ParentalControlsController.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/Http/Controllers/ParentalControlsController.php b/app/Http/Controllers/ParentalControlsController.php index 373021ab9..24f7747ac 100644 --- a/app/Http/Controllers/ParentalControlsController.php +++ b/app/Http/Controllers/ParentalControlsController.php @@ -5,6 +5,7 @@ namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Models\ParentalControls; use App\Models\UserRoles; +use App\Profile; use App\User; use App\Http\Controllers\Auth\RegisterController; use Illuminate\Auth\Events\Registered; @@ -65,6 +66,11 @@ class ParentalControlsController extends Controller $pc->save(); $roles = UserRoleService::mapActions($pc->child_id, $ff); + if(isset($roles['account-force-private'])) { + $c = Profile::whereUserId($pc->child_id)->first(); + $c->is_private = $roles['account-force-private']; + $c->save(); + } UserRoles::whereUserId($pc->child_id)->update(['roles' => $roles]); return redirect($pc->manageUrl() . '?permissions'); }