diff options
author | Minteck <contact@minteck.org> | 2022-10-10 20:51:39 +0200 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-10-10 20:51:39 +0200 |
commit | 108525534c28013cfe1897c30e4565f9893f3766 (patch) | |
tree | dd3e5132971f96ab5f05e7f3f8f6dbbf379a19bd /api/me-picture.php | |
parent | 2162eaa06f7e4764eb3dcfe130ec2c711d0c62ab (diff) | |
download | pluralconnect-108525534c28013cfe1897c30e4565f9893f3766.tar.gz pluralconnect-108525534c28013cfe1897c30e4565f9893f3766.tar.bz2 pluralconnect-108525534c28013cfe1897c30e4565f9893f3766.zip |
Update
Diffstat (limited to 'api/me-picture.php')
-rw-r--r-- | api/me-picture.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/api/me-picture.php b/api/me-picture.php index 636188e..3f0bce0 100644 --- a/api/me-picture.php +++ b/api/me-picture.php @@ -1,12 +1,12 @@ <?php -require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.php"; global $isLoggedIn; +require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.inc"; global $isLoggedIn; if (!$isLoggedIn) header("Location: /-/login") and die(); global $_PROFILE; header("Content-Type: application/json"); -$fronters = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . ($_PROFILE['name'] === "Cloudburst System" ? "ynmuc" : "gdapd") . "-fronters.json"), true); +$fronters = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . ($_PROFILE['name'] === "Cloudburst System" ? "ynmuc" : "gdapd") . "/fronters.json"), true); $member = $fronters["members"][0]; if (isset($member["avatar_url"])) { @@ -15,7 +15,6 @@ if (isset($member["avatar_url"])) { exec("convert -resize 256x256 -quality 50 \"" . $tempfile . "-original" . "\" \"" . $tempfile . "\"", $output); echo("data:image/jpg;base64," . base64_encode(file_get_contents($tempfile))); - //echo(implode("\n", $output)); unlink($tempfile . "-original"); unlink($tempfile); } else { |