1
0
Fork 0
mirror of synced 2024-09-30 01:08:13 +13:00

fix linter

This commit is contained in:
Damodar Lohani 2024-01-28 03:01:34 +00:00
parent e5dfed0aa3
commit 9b7a5f55b7

View file

@ -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);
}
}