php - CakePHP user control -


so have 2 models

clients

employees

the main difference between these 2 employees has different more advanced controls.

now regardless of user logs in need set cookie (what cookie doesnt matter give idea).

now since employees has more options , actions clients there seperate index view the.

now question since both types of users has set cookie possible client login controller meaning "unknown person tries log in" -> "checks client model if user exists" if not "check employees controler if user exists" if true -> "set cookie " ->"go employee view index"

is possible , way it. note reason why need because want create god user in clients table. client table consists of alot of joins , easier create "god like" user same normal client (kind of proxy).

i think you’ve gone wrong way.

ideally, should have users table , corresponding user model, , use acl determine user can , can’t do. can create roles clients , employees, , set permissions on these groups, , assign each user group.

if have client- , employee-specific data wish store, can create these tables/models , set them belong user.


Comments

Popular posts from this blog

matlab - Deleting rows with specific rules -

php - MySQLi multi_query results for later use -