UPDATES EasyBlog 6.0.14 Released! Joomla 5.x and PHP 8.x compatible now!

Helpdesk

Your Time
Our Time
Response Time
24 — 48 hours
We strive to provide the fastest ever response possible. However, we are not super beings.

Allow at least 24 — 48 hours
  Support is online
Our support specialists is available now. We will attend to you as soon as we can.
  Support is online

Set Joomla_Fullname value for account

Daniel Pierce · ·
9:10 AM Wednesday, 30 August 2017
Normal
I'm having a challenge getting setFieldValue to work for JOOMLA_FULLNAME for an user account. Here is the code that I'm using to test if I can create the custom field entry.


require_once ( JPATH_BASE . 'administrator' . DS . 'components' . DS . 'com_easysocial' . DS . 'includes' . DS . 'easysocial.php' );
require_once ( JPATH_BASE . 'administrator' . DS . 'components' . DS . 'com_easysocial' . DS . 'includes' . DS . 'user' . DS . 'user.php' );
require_once ( JPATH_BASE . 'media' . DS . 'com_easysocial' . DS . 'apps' . DS . 'fields' . DS . 'user' . DS . 'joomla_fullname' . DS . 'joomla_fullname.php' );


$user_id = (int) '658';

$user = ES::user($user_id);
$name = new SocialFieldUserJoomla_FullnameObject($user, NULL);

$name->first = (string) 'Fran';
$name->middle = (string) 'Fred';
$name->last = (string) 'Froster';
$name->name = (string) 'Fran Fred Froster';
echo ( '<br>');
var_dump($name);
echo ( '<br><br>');
echo ( $name->toJson() );

$user->setFieldValue('JOOMLA_FULLNAME', $name->toJson() );


I was able to get the setFieldValue to work for all the single fields as well as the address field, but the joomla_fullname just won't let me set the custom field value.

I have the latest version of Joomla and EasySocial installed on Ubuntu 16.04.

Any help would be appreciated.
Dan
The replies under this section are restricted to logged in users or users with an active subscription with us