1
votes

I’m New to yii 2.0 framework, I'm using yii2 Advanced template for my project, For this project i want two user in the front-end, one is borrower and lender. Yii2 comes with user by default i have created it as borrower, like a borrower can sign-up by providing his details and logs-in and see its profile.

Now I want one more user called lender in the same front-end, and he should be able sign-up and login and do other task same as borrower.

Can I use the same user model and controller for this? If no please tell how to do this. Thank you.

1

1 Answers

1
votes

If I get you right, you need roles system (RBAC). http://www.yiiframework.com/doc-2.0/guide-security-authorization.html

Yii2 provides convenient way for it, but it's not easy to understand if you are new to this framework.