Hi Kyle,
CB: 1.9.1
joomla: 3.3.0
I am writing a component which reads a csv file and does the data upload into Users and CB. I am doing this through the tutorial link given
www.joomlapolis.com/support/tutorials/120-api-usage/18357-including-cb-api-for-usage-outside-of-cb
www.joomlapolis.com/support/tutorials/120-api-usage/18362-registering-a-user-through-cb-api
$user = new moscomprofilerUser( $_CB_database );
$user->usertype = ( $usertype ? $usertype : 'Registered' );
$user->gid = $_CB_framework->acl->get_group_id( $user->usertype, 'ARO' );
$user->gids = array( $user->gid ); | |
I want to know how can I set my custom CB fields through it? As per example following creates an object of Joomla user table and I need to access the user object related to #_comprofiler so that I can set the custom fields (addressline1, addressline2, etc) through object and save it.
I tried to set it in user object with below code but this does not seem to work. It is not giving any error as well. There is proper data in csv for all fields and it is being read correctly as well.
$user->addressline1 = $addressline1;
$user->addressline2 = $addressline2;
I know there is CB juice plugin but I want to to use my version due to multiple business functionality to be integrated in own custom module.
Please guide me how to use comprofiler user object and save data to my custom fields which I have created through CB using API.
Warm Regards,
Amit Dangwal