[eluser]tim1965[/eluser]
Hi
I am using DX_auth for my authentication. Within the DX_auth library there is a section that allows you to trigger an event once the user has successfully registered. See below
// If DX_email_activation in config is TRUE,
// this event occurs after user succesfully activated using specified key in their email.
// If DX_email_activation in config is FALSE,
// this event occurs right after user succesfully registered.
function user_activated($user_id)
{
// Load models
$this->ci->load->model('dx_auth/user_profile', 'user_profile');
// Create user profile
$this->ci->user_profile->create_profile($user_id);
}
I need to run an "insert_id" at this point to extract dx_auths last id from its users table. I then need to run a query to pull off the "username" from its "users" table using this id. With the username i then need to to insert this into my own table for my website. Hope that is clear.
So my problem is that the above seems to be the right place to insert my code. However when i insert my code i get errors, that i think relates to the fact that i am not using CI &get;instance. So my question is how best to call my code from within this library. I ma very new to Codeigniters, so any help is very much appreciated. Oh and Happy New Year.