diff options
Diffstat (limited to 'Application/SetDefaultIdentity')
-rw-r--r-- | Application/SetDefaultIdentity/index.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Application/SetDefaultIdentity/index.php b/Application/SetDefaultIdentity/index.php new file mode 100644 index 0000000..d35eb6a --- /dev/null +++ b/Application/SetDefaultIdentity/index.php @@ -0,0 +1,13 @@ +<?php + +require_once $_SERVER['DOCUMENT_ROOT'] . "/Private/SessionManager.php"; global $_PROFILE; +header("Content-Type: application/json"); + +$identities = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/Private/Data/Identities.json"), true); + +$identities[$_PROFILE["id"]]["name"] = $_PROFILE["name"]; +$identities[$_PROFILE["id"]]["picture"] = "https://privateauth.equestria.dev/hub/api/rest/avatar/" . $_PROFILE['id'] . "?dpr=2&size=64"; + +file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/Private/Data/Identities.json", json_encode($identities, JSON_PRETTY_PRINT)); + +die();
\ No newline at end of file |