CodeIgniter Tank Auth

2020-05-24 16:39发布

问题:

I am making use of this excellent library called Tank Auth. Hopefully this question won't be too niche as its specific to this library.

I am trying to work how I can login a user as soon as they have registered. It seems this library doesn't offer this functionality and I don't want to start messing with the library but maybe someone has done this already and can describe a non-hackey way of getting this to work?

Thanks all for any help.

回答1:

The creator of this email library was kind enough to reply to my email very quickly and it was a very easy solution! As simple as calling the login function!

$this->tank_auth->login($data['email'], $this->form_validation->set_value('password'), true, $data['login_by_username'], $data['login_by_email']);