mirror of
https://github.com/ShaYmez/FreeSTAR-Status-Engine.git
synced 2024-11-27 14:48:36 -05:00
add telegram User Data reader
This commit is contained in:
parent
8e1ae46564
commit
65f6de7289
21
telegram.php
Normal file
21
telegram.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user