Hi Guys
Now that you've helped with the mechanics of managing a trial membership of our site, I would like to create a special registration form, that will trigger another page than the one I've set up with Auto-Actions (systemaction).
I was contemplating using Chronoforms for the registration form, and then create a full trial registration form with everything in it.
The CF v5 (whichis current) does not a have a CB registration utility, but they've suggested this code to enter it into CB:
Code:
data['id'] = $user->id;
$db = JFactory::getDBO();
$query = "
INSERT INTO `#__comprofiler` (`id`, `user_id`)
VALUES ('{$user->id}', '{$user->id}') ;
";
$db->setQuery($query);
if ( !$db->query() ) {
JError::raiseWarning(100, $database->getErrorMsg());
}
?>
Is that 'kosher'? Will it work correctly and not break anything?