H
H
hollanditkzn2017-03-09 18:22:03
Yii
hollanditkzn, 2017-03-09 18:22:03

How to change tables during authorization in yii2?

I have a table in the database, when logging in, it takes data from the uset table, but I need the program to check the data from my data table. I can not figure out how to set it up and where to change it. I must say right away that I am new to the framework and I can’t fully understand where exactly the code should be
. I use advanced

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Fedorov, 2017-03-09
@qonand

in your case, the name of the table can be changed in the file common/models/User.php
in general, it is better to read the documentation on this topic

M
Maxim Timofeev, 2017-03-10
@webinar

Depending on what needs to be checked there, I see 2 options: the first one was described to you by Maxim Fedorov , the second one is to connect your table as a link to the user table and implement a verification method in the User model (I don’t know what is checked there, but in fact it doesn’t matter). And correct the method of authorization and registration in the corresponding form models.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question