Codeigniter Ion Auth Custom Name Editing Table

I am new to Codeigniter and just learning the ion authentication system. I just ask a few questions:

1) Is it possible to change the default user table? (and would you advise for it or against it?) I understand that in a model, view, library or controller there may be functions that expect tables to have their exact structures by default, but, for example, I do not need a company column so how can i remove it?

2) How to add additional user information to the default user table? (Will this affect any functions if I just execute some sql to add columns to the user table by default?)

3) This is just what you should get from the whole question: would someone recommend just creating a separate table for my additional user information and using my user ID as the primary key in this new table, and then just access tjat information through my own models?

Thank you for your help!

+4
source share
3 answers
  • Yes, you can edit the user table, however you need to go through ion_auth_model / library to check the calls / records in the field that you are deleting. Otherwise, you will encounter 500 errors when trying to insert data into a nonexistent field.

  • , phpmyadmin, . ( , ), ion_auth.

  • , , , . , , , users. , , , .


, , , , , . , .

+3

/ , Ion Library, . Ion , .

, Ion Library , - .

/ CodeIgniter, , Git.

0

I do not want my users to provide their phone numbers, etc., And I have no desire to store IP addresses. All I did was edit the corresponding tables and mark the rows to accept NULL. Then I removed the field from the form during registration. Then I created an extra table to store the information I want. No errors and works fine

0
source

Source: https://habr.com/ru/post/1612973/


All Articles