Hi Bob,
Finally I came back, I had some problems to solve, but now got back to this issue.
I've realized the problem and the solution is "simple", just enter the data for user registration in the CB table, which entitles me to a 404 page, but the user is registered (in the Users tab) but is not inserted tab in the CB.
What I'm doing is: if the user is registered, I use the action "Custom Code" to insert the record in the table:
<?php /*Novo acesso à Base de Dados*/
// Get a db connection.
$db = JFactory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
// Insert columns.
$columns = array('id', 'user_id', 'firstname', 'hits', 'avatarapproved', 'approved', 'confirmed');
// Insert values.
$values = array($id,$id,$nome,$falso,$vdd,$vdd,$vdd);
// Prepare the insert query.
$query
->insert($db->quoteName('#__comprofiler'))
->columns($db->quoteName($columns))
->values(implode(',', $values));
// Set the query using our newly populated query object and execute it.
$db->setQuery($query);
$db->query();
?>
This actually is my final code, I applied an example I saw on the Joomla API. But also I've used other codes as:
<?php /*Novo acesso à Base de Dados*/
$con=mysqli_connect("localhost","espacoal_bn","brunofilipe@1420!","espacoal_ea");
// Check connection
if (mysqli_connect_errno())
{
echo "Erro ao conetar à base de dados: " . mysqli_connect_error();
}
$id = $form->data['_PLUGINS_']['joomla_registration']['id'];
$nome = $form->data['_PLUGINS_']['joomla_registration']['name'];
$falso = 0;
$vdd = 1;
$query = "INSERT INTO 'jos_comprofiler'('id', 'user_id', 'firstname', 'hits', 'avatarapproved', 'approved', 'confirmed') VALUES ($id,$id,$nome,$falso,$vdd,$vdd,$vdd)";
if (!$con->query($query)) {
printf("Error: %s\n", $con->error);
}
mysqli_close($con);
?>
Do you can help me?
I have some urgency to solve this problem.
Thanks in advance,
Cya
BN