diff options
| author | ilotterytea <iltsu@alright.party> | 2025-05-12 14:22:10 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-05-12 14:22:10 +0500 |
| commit | 812522ce295c145dd3ad89e21d13d8d5260e55a9 (patch) | |
| tree | 43d9e5b14c154f5d89b3340e9e2d24e323ac4149 | |
| parent | 437c0482c62794231e713628bb36a54f665a053e (diff) | |
upd: don't save twitch avatar
| -rw-r--r-- | public/account/login/twitch.php | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/public/account/login/twitch.php b/public/account/login/twitch.php index af9802e..38fd6cc 100644 --- a/public/account/login/twitch.php +++ b/public/account/login/twitch.php @@ -172,42 +172,4 @@ setcookie("secret_key", $user_secret_key, time() + ACCOUNT_COOKIE_MAX_LIFETIME, $db = null; -// downloading profile picture -$path = "../../static/userdata/avatars"; - -if (!is_dir($path)) { - mkdir($path, 0777, true); -} - -if (!is_file("$path/$user_id")) { - $fp = fopen("$path/$user_id", "wb"); - $request = curl_init(); - curl_setopt($request, CURLOPT_URL, $twitch_user["profile_image_url"]); - curl_setopt($request, CURLOPT_FILE, $fp); - curl_setopt($request, CURLOPT_HEADER, 0); - - curl_exec($request); - curl_close($request); - fclose($fp); -} - -// downloading profile banner -$path = "../../static/userdata/banners"; - -if (!is_dir($path)) { - mkdir($path, 0777, true); -} - -if (!is_file("$path/$user_id")) { - $fp = fopen("$path/$user_id", "wb"); - $request = curl_init(); - curl_setopt($request, CURLOPT_URL, $twitch_user["offline_image_url"]); - curl_setopt($request, CURLOPT_FILE, $fp); - curl_setopt($request, CURLOPT_HEADER, 0); - - curl_exec($request); - curl_close($request); - fclose($fp); -} - header("Location: /account");
\ No newline at end of file |
