I’m new learner in CI and follow this CI simple login library (see here) in my project, everything is work pretty fine with this simple library except of if I want to add some more fields in the database table, how can I create and fetch the new added field?
This library is origin come with ‘id’, ‘username’, ’email’ and ‘password’ fields only, how if I want to add in field such as ‘address’, and make it usable in create a user $this->simplelogin->create('user', 'user@mail.com', 'password', 'address', true); and fetch $this->simplelogin->get_data_user('address'); in view?
Thanks.
You can change:
Add property
private $address_field = ‘address’; // address in database
//Make sure that in your database must have the field
addressChangge function create():
Changge function get_data_user():
Change line 106 in login function: