Delete User with Application API¶
Delete the given user.
Usage¶
<?php
$pterodactyl->deleteUser($userId);
//For a user instance
$user->delete();
?>
Parameters¶
Note
The userId is the id of the server, not externalId or uuid.
| Parameter | Description | Rules |
|---|---|---|
| userId | The id of the user |
Returns¶
None
Throwing exception if failed.
Example¶
<?php
try {
$pterodactyl->deleteUser(14);
} catch(\Exception $e){
print_r($e->getMessage());
}
?>
<?php
try {
$user = $pterodactyl->user(14);
$user->delete();
} catch(\Exception $e){
print_r($e->getMessage());
}
?>