prohibit emails from showing up in api if hide_email is true

This commit is contained in:
RealAngeleno 2023-07-10 04:02:51 -07:00 committed by -
parent bd8b76a41f
commit 8207b11024

View File

@ -81,6 +81,9 @@ class Api {
$toInt = isset(self::$ints[$translated]); $toInt = isset(self::$ints[$translated]);
$val = $object->$local; $val = $object->$local;
if (isset($this->config['hide_email']) && $this->config['hide_email'] && $local === 'email') {
$val = '';
}
if ($val !== null && $val !== '') { if ($val !== null && $val !== '') {
$apiPost[$translated] = $toInt ? (int) $val : $val; $apiPost[$translated] = $toInt ? (int) $val : $val;
} }