Skip to content

Commit

Permalink
webhooks
Browse files Browse the repository at this point in the history
  • Loading branch information
cmyui committed Oct 21, 2024
1 parent eb6f85f commit 193a21a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions inc/Do.php
Original file line number Diff line number Diff line change
Expand Up @@ -1207,10 +1207,12 @@ public static function DeleteUserAccount()
}
$requestUrl = $INTERNAL_USERS_SERVICE_BASE_URL . "/api/v1/users/" . $userId;
$resp = makeJsonWebRequest("DELETE", $requestUrl);
print_r($resp);
if ($resp["status"] !== 204) {
postWebhookMessage("failed to send FokaBot message :( Error: " . print_r($resp["message"], true));
rapLog("failed to send FokaBot message :( Error: " . print_r($resp["message"], true));
if ($resp["status"] === 204) {
postWebhookMessage("Successfully processed a GDPR/CCPA user deletion request for user: " . $userId);
rapLog("Successfully processed a GDPR/CCPA user deletion request for user: " . $userId);
} else {
postWebhookMessage("Failed to process a GDPR/CCPA user deletion request for user: " . $userId);
rapLog("Failed to process a GDPR/CCPA user deletion request for user: " . $userId);
}
redirect("index.php?p=102&s=User account has been deleted");
} catch (Exception $e) {
Expand Down

0 comments on commit 193a21a

Please sign in to comment.