Hi Community Builder!
I have a very specific question.
I am using the CB multi-tab registration for a different part of my website and for another specific part of the site I would like to use an Acymailing registration module that subscribes users to a newsletter.
Then when users want to change their subscription they obviously access the community builder profile page and it is done correctly and everything is correctly synchronized with ACYmailing with the help of the plugin. However I did notice that when users register using acymailing, their address and phone for example don't show up in community builder's profile page. I did some research and I do understand that you should extensively use the community builder's login module and registration module for all the user info to show up.
But I have been working on some of my own code and used some other custom code and ideally what I would like to have is the address and phone from the acymailing registration module to populate that info into the Community builder profile.
Here is some code I am working with already:
function onAcyUserCreate($subscriber) {
jimport('joomla.user.helper');
$data = array(
"name"=>$subscriber->name,
"username"=>$subscriber->email,
"password"=>$subscriber->password,
"password2"=>$subscriber->password,
"email"=>$subscriber->email,
"cb_address"=>$subscriber->address,
"cb_city"=>$subscriber->city,
"block"=>0,
"groups"=>array("1","2")
);
$user = new JUser;
//Write to database
if(!$user->bind($data)) {
throw new Exception("Could not bind data. Error: " . $user->getError());
}
if (!$user->save()) {
throw new Exception("Could not save user. Error: " . $user->getError());
}
return $user->id;
}
I haven't done too much research and am not an expert php programmer, however I can image that I should call up that part of the cb database/user table such as cbimport (if it exists) and then as I mentioned in the code from above insert the data from the registration module into the cb user tables similarly: "cb_address"=>$subscriber->address,
"cb_city"=>$subscriber->city,
Any help is much appreciated.
If there is any type of sync hack/feature or link upon registration that would be much appreciated. Or even if it is not linked but just enters in the information upon registration, that could be good enough too.
THank you very much.