1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-12 01:50:48 +01:00

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 GitHub
parent 694351baa8
commit f48872d5a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}