From f48872d5a4601668270c80dab2dcdce30827c14c Mon Sep 17 00:00:00 2001 From: RealAngeleno Date: Mon, 10 Jul 2023 04:02:51 -0700 Subject: [PATCH] prohibit emails from showing up in api if hide_email is true --- inc/api.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/inc/api.php b/inc/api.php index 3a5c8da3..0dd479ac 100644 --- a/inc/api.php +++ b/inc/api.php @@ -80,6 +80,9 @@ class Api { $toInt = isset(self::$ints[$translated]); $val = $object->$local; + if (isset($this->config['hide_email']) && $this->config['hide_email'] && $local === 'email') { + $val = ''; + } if ($val !== null && $val !== '') { $apiPost[$translated] = $toInt ? (int) $val : $val; }