Welcome Guest, Not a member yet? Register   Sign In
set extra authentication variable from usertable

I added a new column "dummy" to usertable and made changes in 


 declared in 


But still unable to set authentication variable "dummy". 
[font=Arial,]NOTE I Know there is a define way to pull profile data in community autho BUT for single column i don't want to create a extra table.[/font]

It would help if you told us what Auth System you were using.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )

The get_auth_data() function will only GET data, it doesn't SET anything.

I really apologise. I was working with community auth and trying to extra authentication variable. @skunkbot already described a proper way to pull profile data but I only need one extra variable without creating extra table.

1) You add your field to the user table.
2) You modify your existing auth model (not Community Auth's auth model). If you don't have one, make one and declare it.
3) Modify your auth model's get_auth_data and check_login_status methods to return your new field.
4) If you haven't already, extend the _set_user_variables method that is in Auth_Controller by adding it to MY_Controller. Add your new field to controller properties, config values, or whatever you want.

Theme © iAndrew 2016 - Forum software by © MyBB