Skip to content

Open-source social media scheduler built for AI agents and the teams behind them. Create, schedule and publish posts to every network through MCP or the REST API, or write them yourself in a composer your team will love.

Refactor account deletion condition in ProfileController

Sebastian Albertc7309627abf2
diff --git a/app/Http/Controllers/App/Settings/ProfileController.php b/app/Http/Controllers/App/Settings/ProfileController.php
index 0d7273bea..69d6a3d6e 100644
--- a/app/Http/Controllers/App/Settings/ProfileController.php
+++ b/app/Http/Controllers/App/Settings/ProfileController.php
@@ -126,8 +126,8 @@ class ProfileController extends Controller
$user->workspaces()->detach();
- if ($account) {
- $account->delete();
+ if ($account && $user->isAccountOwner()) {
+ $account->delete();
}
});