diff options
author | Minteck <contact@minteck.org> | 2023-02-23 19:34:56 +0100 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2023-02-23 19:34:56 +0100 |
commit | 3d1cd02f27518f1a04374c7c8320cd5d82ede6e9 (patch) | |
tree | 75be5fba4368472fb11c8015aee026b2b9a71888 /api/me-picture.php | |
parent | 8cc1f13c17fa2fb5a4410542d39e650e02945634 (diff) | |
download | pluralconnect-3d1cd02f27518f1a04374c7c8320cd5d82ede6e9.tar.gz pluralconnect-3d1cd02f27518f1a04374c7c8320cd5d82ede6e9.tar.bz2 pluralconnect-3d1cd02f27518f1a04374c7c8320cd5d82ede6e9.zip |
Updated 40 files, added 37 files, deleted 1103 files and renamed 3905 files (automated)
Diffstat (limited to 'api/me-picture.php')
-rw-r--r-- | api/me-picture.php | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/api/me-picture.php b/api/me-picture.php deleted file mode 100644 index 3f0bce0..0000000 --- a/api/me-picture.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php - -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); -$member = $fronters["members"][0]; - -if (isset($member["avatar_url"])) { - $tempfile = "/tmp/avatar-" . rand(0, 999999) . ".jpg"; - file_put_contents($tempfile . "-original", file_get_contents($member["avatar_url"])); - exec("convert -resize 256x256 -quality 50 \"" . $tempfile . "-original" . "\" \"" . $tempfile . "\"", $output); - - echo("data:image/jpg;base64," . base64_encode(file_get_contents($tempfile))); - unlink($tempfile . "-original"); - unlink($tempfile); -} else { - die(); -}
\ No newline at end of file |