Skip to Content Skip to Menu

Community Builder API will not update users with SuperUser privledges

  • c_koop
  • c_koop
  • OFFLINE
  • Posts: 1
  • Thanks: 0
  • Karma: 0
9 years 6 months 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 or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum