Community Builder API will not update users with SuperUser privledges

9 years 1 month ago #260173 by c_koop
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();

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.278 seconds

Facebook Twitter LinkedIn