UPDATES EasyBlog 6.0.11 Released! Update to the latest version 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 offline
It is currently off working hours and most of us aren't around

Rest assured that we will get back to you as soon as the day starts tomorrow!
It is currently a public holiday for us from where we are at.

There may be a delay in our responses but rest assured that we will be back at full speed when we are back to the office.
  Support is offline

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