Authentication yii through the user module

0

I am using the module user yii whose code is in this link , but in my database I also have a client table.

Is it possible to use the login of the user module to authenticate the client or do I have to create another login for the client? Or can I relate the client table to the module's user table?

    
asked by anonymous 01.10.2014 / 15:56

3 answers

1

You can do this, however you will have to create the model and adapt the login functions to get the new model with your rules.

I still think it would be more practical to log in from scratch.

    
01.10.2014 / 16:32
0

You can create both, and put an FK on your client by directing you to the extension login.

It's not very nice to create a 1 to 1 relationship, but it solves your problems. When the user logs in, there will be only one client that has that user id, so you know which client is logged in.

    
28.10.2014 / 15:46
0

The best solution would be to refactor to use only one login, you could use the RBAC to set the access rules for each Profile / Login as well. By doing this, you will have less work if the project you are working on is scalable.

    
24.02.2015 / 16:01