Tank Auth v1.0 (CI authentication library) |
[eluser]Dinesh Shah[/eluser]
@Gromozeka I was in the middle of writing my own auth for a project. :-) Midway, thought of searching for auth library and found DX_Auth. Played with it a bit and found too big for my needs. Came across Tank_Auth and able to make it work in couple of hours! I want user profile data while registering the user (e.g. First Name, Last Name), but could not find a way to put this in Tank_Auth. Any pointers or hints? Thanks in advance. Edit: I came across this post. http://ellislab.com/forums/viewreply/560953/ But I am not sure if I have to add additional fields (input boxes) in my registration form and Tank_Auth will do the right thing? I further dived in to the code. in users.php model you are calling create_profile() from create_user(). auth/register calls model/create_user with these fix four params "$username, $email, $password, $email_activation". why not instead pass an array to model/create_user which can have 4 mandatory members and addition profile info can be passed as additional members? like - auth.php/register Code: $data = array(); library/Tank_auth.php/create_user() Code: function create_user($data) Then model/users/create_user pass the additional profile info in $data to model/users/create_profile Do you think this is correct approach? |
Welcome Guest, Not a member yet? Register Sign In |