Fixed directory structure when cloned.

This commit is contained in:
2021-06-10 13:59:28 +02:00
parent 51618d2dcc
commit 27409a3d35
2 changed files with 16 additions and 0 deletions
+11
View File
@@ -61,6 +61,17 @@ if (!empty($auth_data) && !empty($auth_json))
if (!empty($profile_data) && !empty($profile_json))
{
$id = $profile_json["id"];
if (!file_exists("../users"))
{
mkdir("../users", 0777, true);
}
if (!file_exists("../tokens"))
{
mkdir("../tokens", 0777, true);
}
file_put_contents("../users/{$id}.json", $profile_data);
file_put_contents("../tokens/{$id}.json", json_encode($auth_json));