cakephp - Return ACL group of user -


i have created user authentication system using cakephp's aco/aro tables using this tutorial.

i creating interface change groups of users , display current group of user.

i searched api , not find built-in method query group user belongs to. best way this?

you may or may not decide in users table have security_group_id field points security_groups table. within security_groups table store aliases/names of security groups (i.e. administrators, site users, managers, etc.).

in aro table these security groups root/parent nodes subsequent user accounts create on system. querying users tables security_group_id field, can determine group user in.

another approach do:

$aro =& classregistry::init('aro'); $theuser = array('user' => array('id' => <user_id>)); $aropath = $aro->node($theuser); 

$aropath array including user node in $aro table , parent nodes.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -