![]() |
set extra authentication variable from usertable - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: External Resources (https://forum.codeigniter.com/forumdisplay.php?fid=7) +--- Forum: Addins (https://forum.codeigniter.com/forumdisplay.php?fid=13) +--- Thread: set extra authentication variable from usertable (/showthread.php?tid=71638) |
set extra authentication variable from usertable - Pawan6161 - 09-08-2018 I added a new column "dummy" to usertable and made changes in Code: get_auth_data() declared in Code: Auth_Controller_set_user_variables() But still unable to set authentication variable "dummy". 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. RE: set extra authentication variable from usertable - InsiteFX - 09-09-2018 It would help if you told us what Auth System you were using. RE: set extra authentication variable from usertable - Wouter60 - 09-09-2018 The get_auth_data() function will only GET data, it doesn't SET anything. RE: set extra authentication variable from usertable - Pawan6161 - 09-11-2018 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. RE: set extra authentication variable from usertable - skunkbad - 09-11-2018 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. |