From 812522ce295c145dd3ad89e21d13d8d5260e55a9 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Mon, 12 May 2025 14:22:10 +0500 Subject: upd: don't save twitch avatar --- public/account/login/twitch.php | 38 -------------------------------------- 1 file changed, 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 -- cgit v1.2.3