<?php | |
// See: https://gist.github.com/woganmay/4c15a0f7c16e41ab3a3ea1a73c595bf9 | |
$api_url = sprintf("https://my.flarum.site/api/users/%s/avatar", $user->id); | |
// See: https://gist.github.com/woganmay/88f15e96fc019657a0e594366403b5cf | |
$token = $session->token; | |
$ch = curl_init($api_url); | |
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE"); | |
curl_setopt($ch, CURLOPT_HTTPHEADER, [ | |
'Content-Type: application/json', | |
'Authorization: Token ' . $token | |
]); | |
$result = curl_exec($ch); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment