Hi. I'm trying to create a form that among other things updates the Joomla user information. It seems to work just fine when updating the username, password, and email. However, I can't seem to get it to update the name field.
I've tried:
$user =& JUser::getInstance((int)$id);
$user->set('name', 'newname');
if ( !$user->save() ) return false;
and also:
$user =& JUser::getInstance((int)$id);
$post['name'] = 'newname';
if (!$user->bind($post)) return false;
if ( !$user->save() ) return false;
Neither seems to work. As I said, both ways work when updating username, password, or email but not for name. Also, I am using the user bind way when I initially create the user and that does populate the name field correctly. So, I'm not sure what I am doing wrong.
Any suggestions? Is there something I am missing or doing wrong?
Thanks,
greg