diff options
author | Minteck <contact@minteck.org> | 2022-07-11 18:54:47 +0200 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-07-11 18:54:47 +0200 |
commit | f70cf5893bb775625e79ed959721ede03e34a108 (patch) | |
tree | b43b6c392d580304fb47777d240f529e92ea17b0 /Application/SetDefaultIdentity | |
parent | 2629b95c437cce1d331d8f4ab3a0d1ff394930a7 (diff) | |
download | bits-server-mane.tar.gz bits-server-mane.tar.bz2 bits-server-mane.zip |
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 |