mirror of
https://github.com/ShaYmez/FreeSTAR-Status-Engine.git
synced 2024-11-14 08:11:45 -05:00
21 lines
379 B
PHP
21 lines
379 B
PHP
|
<?php
|
||
|
/**
|
||
|
* Get telegram user data
|
||
|
*
|
||
|
* Gets telegram user data from cookie and save it to array
|
||
|
*
|
||
|
* @return void
|
||
|
*
|
||
|
* @author Telegram
|
||
|
*
|
||
|
*
|
||
|
* @since 0.1
|
||
|
*/
|
||
|
function getTelegramUserData() {
|
||
|
if (isset($_COOKIE['tg_user'])) {
|
||
|
$auth_data_json = urldecode($_COOKIE['tg_user']);
|
||
|
$auth_data = json_decode($auth_data_json, true);
|
||
|
return $auth_data;
|
||
|
}
|
||
|
return false;
|
||
|
}
|