detach all vouchers from the user when deleting the user

This commit is contained in:
AVMG20 2021-07-10 09:24:14 +02:00
parent f50ba11340
commit 348868d6bd

View file

@ -105,6 +105,8 @@ class User extends Authenticatable implements MustVerifyEmail
}
});
$user->vouchers()->detach();
Pterodactyl::client()->delete("/application/users/{$user->pterodactyl_id}");
});
}