From 23b85145abeacbcec0ecff380cc078a3fa1b9e6f Mon Sep 17 00:00:00 2001 From: Tijn Kuyper Date: Thu, 10 Jan 2019 21:46:45 +0100 Subject: [PATCH] Fixes #1799 - Check UE field for read permission --- e107_core/shortcodes/batch/user_shortcodes.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/e107_core/shortcodes/batch/user_shortcodes.php b/e107_core/shortcodes/batch/user_shortcodes.php index 3288158fe..6e5f584b4 100644 --- a/e107_core/shortcodes/batch/user_shortcodes.php +++ b/e107_core/shortcodes/batch/user_shortcodes.php @@ -747,8 +747,9 @@ function sc_user_email($parm='') { $key = $f['user_extended_struct_name']; - - if($ue_name = $tp->parseTemplate("{USER_EXTENDED={$key}.text.{$this->var['user_id']}}", TRUE)) + $field = 'user_'.$key; + + if($ue->hasPermission($field) && $ue_name = $tp->parseTemplate("{USER_EXTENDED={$key}.text.{$this->var['user_id']}}", TRUE)) { $extended_record = str_replace("EXTENDED_ICON","USER_EXTENDED={$key}.icon", $EXTENDED_CATEGORY_TABLE); @@ -991,4 +992,3 @@ function sc_user_email($parm='') } -?>