how to create separate login for frontend and backend using cakephp 3.0 and session should be different?

早过忘川 提交于 2019-12-13 10:23:41

问题


I want to create a application where role will be different like (Admin, Partner, Student,Trainer), And I want to separate session/Auth for each role and login too. I do not want to login with Users table, even want to with student, trainer like that. Please help me.


回答1:


Don't make things complex:

Manage your login access from two tables:

Roles:

This should include all role types

Users:

This should include at least login information like username/email, password etc. 

And obviously make relations like:

Users belongs to Roles , means each user has different role.

You can manage login separately according to their role (see here). On doing so yo don't need to login them from different table.I bet that just make things complex.



来源:https://stackoverflow.com/questions/40928653/how-to-create-separate-login-for-frontend-and-backend-using-cakephp-3-0-and-sess

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!