Hi, I have wrote a custom PHP function which goes out to 3rd party database and attempts to update CB User data fields. It appears that this works for all Joomla users, unless they have been setup as a SuperUser. Once i disable the user as a SuperUser the code works fine. Any explanation as to why this could be?
My relevant code is below.
$myId = $_CB_framework->myId();
$cbUser =& CBuser::getInstance($joomlaUserId);
if ( ! $cbUser )
{
$cbUser =& CBuser::getInstance( null );
}
//get the user data
$user2 =& $cbUser->getUserData();
$user2->cb_jobtitle = (string)$employeeData; //set a field
$user2->store();