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
Any suggestions?
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?