# User Data

{% hint style="danger" %}
**Please note:** This page is under construction and has not been finished yet.
{% endhint %}

&#x20;Returns an array of user data for a specific user. Input can be either a specific ID (`$user_id`) or use `USERID` for the currently logged in user.

```php
e107::user($user_id);

$userData = e107::user(USERID); // Example - currently logged in user. 
$userData = e107::user(5); // Example  User ID #5.
```

{% hint style="info" %}
todo: add example output
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://devguide.e107.org/classes-and-methods/user-data.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
