I\'ve been working with the Tank Auth library all day and have a question about it. I added two fields to the registration form: first_name and last_name respectively and I\
I noticed a couple things:
private function create_profile($user_id, $data)
{
$this->db->set('user_id', $user_id);
$this->db->set('first_name', $first_name);
$this->db->set('last_name', $last_name);
return $this->db->insert($this->profile_table_name);
}
$data
is an array, I'm assuming you SHOULD pass first_name
and last_name
here (which you do not).
Also TANK AUTH requires you to updated the columns you need for profile database schema (did you do this? didn't mention).
To correct the code above, you would need to pass more details in the array ($data
) like so:
$data['first_name'] = "Bob";
$data['last_name'] = "Smith";
create_profile($user_id, $data); // which would then use the first & last names
Not that I want to keep a conversation going about this but...*
You need to do just what I showed you:
create_profile
fn.$data[0]
that is SLOPPY, do $data['first_name']
if that is what you called the array value. There is no reason to be sloppy and do $data[0] -- guessing no less at the key value of your array).