CV7 adding user custom fields in overview

arampro 01 Feb, 2021
Hi,
I'm trying to use the custom fields of users in an overview (and email them). So just grabbing them from the database.
In v6 I could use the following and it worked.[pre]JLoader::register( 'FieldsHelper', JPATH_ADMINISTRATOR . '/components/com_fields/helpers/fields.php' );
$customFields = FieldsHelper::getFields( 'com_users.user', JFactory::getUser(), true ); [br]?>[/pre]
But in V7 when I try to save the form, it crashes. (I already have selected "Run PHP" option). Any idea Why this happens?
(I tested t on php7.3 and 7.4).

EDIT:[br]This problem seems to be solved. I had to completely remove CF. (Also manually the remaining tables in the Database).

EDIT 2:
The problem is back again. I still have no idea why exactly this is happening. By try and error I found out that
JFactory::getUser()
is causing the crash.

Any suggestions?
Max_admin 14 Feb, 2021
Answer
your code should have a starting PHP tag!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
arampro 14 Feb, 2021
Hi Max,
The problem was not lack of any syntax, but an server security issue. So this issue is been solved, by temporary turn it off.
Cheers,
You need to login to be able to post a reply.