2018-04-01 13:19:25 +02:00
|
|
|
---
|
|
|
|
title: get_self
|
|
|
|
description: get_self parameters, return type and example
|
|
|
|
---
|
|
|
|
## Method: get_self
|
|
|
|
|
|
|
|
Gets info about the currently logged-in user.
|
|
|
|
|
|
|
|
No parameters
|
|
|
|
|
|
|
|
### Return type: [User object](API_docs/types/User.md)
|
|
|
|
|
|
|
|
### Example:
|
|
|
|
|
|
|
|
|
2018-10-17 17:10:50 +02:00
|
|
|
```php
|
2018-04-01 13:19:25 +02:00
|
|
|
$MadelineProto = new \danog\MadelineProto\API();
|
|
|
|
$MadelineProto->start();
|
|
|
|
|
|
|
|
$User = $MadelineProto->get_self();
|
|
|
|
```
|
|
|
|
|
|
|
|
Or, if you're into Lua:
|
|
|
|
|
2018-10-17 17:10:50 +02:00
|
|
|
```lua
|
2018-04-01 13:19:25 +02:00
|
|
|
User = get_self()
|
|
|
|
```
|
|
|
|
|