From 28ab15669d62375849ff6e933f6cd8f220dfda75 Mon Sep 17 00:00:00 2001 From: William P Date: Sun, 23 Jul 2023 22:43:08 +0100 Subject: [PATCH] Add sensitive information toggle. --- includes/hooks/WHMCS-Discord-Notifications.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/includes/hooks/WHMCS-Discord-Notifications.php b/includes/hooks/WHMCS-Discord-Notifications.php index 4a7210a..93020b7 100644 --- a/includes/hooks/WHMCS-Discord-Notifications.php +++ b/includes/hooks/WHMCS-Discord-Notifications.php @@ -2,8 +2,8 @@ ///////////////////////// Provided For Free By ///////////////////////// // // -// PrimeNodes - Premium Infrastructure Provider // -// William Phillips - MetallicGloss.com // +// Zare - Affordable DDoS Protected Servers // +// William P - MetallicGloss.com // // // //////////////////////////////////////////////////////////////////////// @@ -38,6 +38,11 @@ $GLOBALS['discordGroupID'] = ""; $GLOBALS['discordWebHookAvatar'] = ""; // (OPTIONAL SETTING) Your desired Webhook Avatar. Please make sure you enter a direct link to the image (E.G. https://example.com/iownpaypal.png ). +// Sensitive Information Display +$GLOBALS['sensitiveInformation'] = False; // False/True +// Note: Disabled by default; if enabled, customer emails will be included in some notifications. +// WARNING: Sharing/storing personally identifable information on Discord will require the update of your privacy policy (if applicable) to allow you to remain in compliance with GDPR. + /////////////////////////////////////////////////////////////////////// ////////////////////////// Notification Area ////////////////////////// @@ -101,7 +106,7 @@ if($invoicePaid === true): 'fields' => array( array( 'name' => 'User Email', - 'value' => $client['email'], + 'value' => ($GLOBALS['sensitiveInformation'] ? $client['email'] : "-- Redacted --"), 'inline' => true ), array( @@ -294,7 +299,7 @@ if($orderPaid === true): 'fields' => array( array( 'name' => 'User Email', - 'value' => $client['email'], + 'value' => ($GLOBALS['sensitiveInformation'] ? $client['email'] : "-- Redacted --"), 'inline' => true ), array(