Get User with Application API

Get a user instance.

Usage

<?php
    $pterodactyl->user($userId, $includes = []);
?>

Parameters

Note

The userId is the id of the server, not externalId or uuid.

Parameter Description Rules
userId The id of the user
includes The related data you want to query

Returns

Returns a user instance.

{
    "id": 1,
    "externalId": "1",
    "uuid": "c747ebbb-1989-413b-8eba-a49b74277c9f",
    "username": "user1",
    "email": "user1@email.com",
    "firstName": "user",
    "lastName": "123",
    "language": "zh",
    "rootAdmin": true,
    "createdAt": "2019-01-05T12:57:04+00:00",
    "updatedAt": "2019-07-12T05:01:15+00:00",
    "object": "user",
    "2fa": true
}

Example

<?php
    $user = $pterodactyl->user(1);
    print_r($user);
?>