Call to a member function addObject() on array when use custom code to add user
-
Hi Alex,
Sorry to bother u again.
Just found another issue with new version:
the old code is try to add an user in one group:
global $userAccessManager; $uamAccessHandler = $userAccessManager->getAccessHandler(); $uamUserGroup = $uamAccessHandler->getUserGroups("1"); $uamUserGroup->addObject('user', $wp_uid); $uamUserGroup->save();As upgrade to new version, i change:
$uamUserGroup->addObject('user', $wp_uid);
to
$uamUserGroup->addObject('_user_', $wp_uid);But it still stops at this step with error:
Fatal error: Call to a member function addObject() on arrayCan you help again? Thanks a lot.
Cheers,
Mcwolf
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
The topic ‘Call to a member function addObject() on array when use custom code to add user’ is closed to new replies.