Hi Kyle,
Here is the code our contractor wrote:
Code:
$db = JFactory::getDbo();
$user_type = "SELECT * FROM #__animalid WHERE assignedid='0' ORDER BY sealnumber ASC LIMIT 0,1";
$db->setQuery($user_type);
$user_type_detail1 = $db->loadAssoc();
$sealnumber=$user_type_detail1["sealnumber"];
$tagid=$user_type_detail1["tagid"];
$gender=$user_type_detail1["gender"];
$size=$user_type_detail1["size"];
$birthyear=$user_type_detail1["birthyear"];
$homeisland=$user_type_detail1["homeisland"];
$db->setQuery("UPDATE #__comprofiler SET cb_tagid='".$tagid."',cb_gender='".$gender."',cb_size='".$size."',cb_birthyear='".$birthyear."',cb_homeisland = '".$homeisland."' WHERE `user_id`= '[user_id]'");
$db->query();
$db->setQuery("UPDATE #__animalid SET assignedid='[user_id]' WHERE sealnumber='".$sealnumber."'");
$db->query();
What do you think?
I added the following to the bottom of the code above:
Code:
$_POST['cb_tagid'] = 'VALUE';
Then I added [post_cb_tagid] in the email auto action and received an email with "VALUE" in the body (not the actual value). I know we have to be close to solving this.