MeAppBuilder
Member
Hello,
I am facing a small problem concerning my registration form.
Currently I am using "JUSER" and "PHP onBeforeProcess"...just an example:
this will work fine, but fields like {xfabrik_user___publish_ip} or {xfabrik_user___password} will only work correct, when I don't use "return false;". When I delete "return false;" in PHP, password is being encrypted MD5 and IP is stored, but...some fields like "databasejoin" return NULL.
I am looking for best practice to transfer input of fields to database. I hope my question is not confusing. Right now I believe I shouldn't use "return false;" in PHP, but how can I trigger input of fields without loosing those values?
Thank you
I am facing a small problem concerning my registration form.
Currently I am using "JUSER" and "PHP onBeforeProcess"...just an example:
Code:
// insert
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$columns = array( 'edit', 'edit_author', 'edit_datetime', 'edit_ip', 'publish', 'publish_author', 'publish_datetime', 'publish_ip');
$values = array();
// proper escaping/quotes should be done here, and probably in a loop, but cluttered the answer, so omitted it
$values[] = "' 1,'".$uk_id."', '".$datetime."', '{xfabrik_user___edit_ip}', 1,'".$uk_id."', '".$datetime."', '{xfabrik_user___publish_ip}'";
$query->insert($db->quoteName('xfabrik_user'));
$query->columns($columns);
$query->values($values);
$db->setQuery($query);
$db->query();
// exit form
return false;
this will work fine, but fields like {xfabrik_user___publish_ip} or {xfabrik_user___password} will only work correct, when I don't use "return false;". When I delete "return false;" in PHP, password is being encrypted MD5 and IP is stored, but...some fields like "databasejoin" return NULL.
I am looking for best practice to transfer input of fields to database. I hope my question is not confusing. Right now I believe I shouldn't use "return false;" in PHP, but how can I trigger input of fields without loosing those values?
Thank you