UEF database type is not rendered in admin area and with single USER_EUF shortcode.
It is rendered with {USER_EXTENDED_ALL} shortcode
How to Reproduce
Steps to reproduce the behavior:
Add custom field f.e. test, set database type and select f.e. news_category table.
Add to user and select something
In admin area add it as user column - nothing is displayed
add shortcode to user_template f.e.
` ***
here: {USER_EUF: field=test}
{USER_EXTENDED_ALL}`
Expected Behavior
A clear and concise description of what you expected to happen.
Screenshots
UEF:
admin column display nothing
user profile display nothing, only second all shortcode data are displayed (to check it isset correctly)
PHP Version
PHP 7.4
The reason for frontend:
case EUF_DB_FIELD : // check for db_lookup type
if(!isset($fieldname))
{
return null;
}
$structValues = $this->getFieldValues($fieldname);
$fieldname is not set at all.
Attempt to fix:
added 3rd parameter
return $ext->renderValue($val,$type, $fld);
+
public function renderValue($value, $type=null, $fieldname = '')
It worked. No idea if it changes something for other types.
Bug Description
UEF database type is not rendered in admin area and with single USER_EUF shortcode. It is rendered with {USER_EXTENDED_ALL} shortcode
How to Reproduce
Steps to reproduce the behavior:
Expected Behavior
A clear and concise description of what you expected to happen.
Screenshots
UEF:
admin column display nothing
user profile display nothing, only second all shortcode data are displayed (to check it isset correctly)
PHP Version
The reason for frontend:
$fieldname is not set at all.
Attempt to fix: added 3rd parameter
return $ext->renderValue($val,$type, $fld);
+public function renderValue($value, $type=null, $fieldname = '')
It worked. No idea if it changes something for other types.