diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 608a564150..3e07514e79 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -3040,13 +3040,13 @@ App::delete('/v1/account') if ($user->isEmpty()) { throw new Exception(Exception::USER_NOT_FOUND); } - + if ($project->getId() === 'console') { // get all memberships $memberships = $user->getAttribute('memberships', []); foreach ($memberships as $membership) { // prevent deletion if at lease one active membership - if($membership->getAttribute('confirm', false)) { + if ($membership->getAttribute('confirm', false)) { throw new Exception(Exception::USER_DELETION_WITH_ACTIVE_TEAMS); } }