[eluser]Devon Lambert[/eluser]
[quote author="Timothy_" date="1290436403"]Hello Devon,
Thanks for replying.
I have to add some more data to my DB specific to the user right after registering them. I don't have a lot of experience in passing data back from the model so i'm pretty lost...
Is there a code example you could point me towards?
Thanks,
Tim Mohr[/quote]
Unfortunately, I can't see any specific function provided by Ion_auth that provides this functionality to your controller. The register function lives within the library and returns the user_id. Someone else may have a better idea for getting at the user_id but it sounds like you may need to modify the library to get what your after.
Take a look at the below code found within the register function. You'll see how the devs were able to extract the user_id and store it in a variable to be passed in the event of email activation.
Found at line 320 in the Ion_auth library.
Code:
$activation_code = $this->ci->ion_auth_model->activation_code;
$identity = $this->ci->config->item('identity', 'ion_auth');
$user = $this->ci->ion_auth_model->get_user($id)->row();
$data = array(
'identity' => $user->{$identity},
'id' => $user->id,
'email' => $email,
'activation' => $activation_code,
);