I'm using CakePHP here. Let's say I have 3 groups of user, namely:
- Super Admin
- Admin
- Customer
and this scenario has been setup using ACL.
Now, how do I return only users that belong to a particular group? e.g. Find all Customer only
I am able to do this using pure SQL statement:
SELECT *
FROM `users`
WHERE `id`
IN (
SELECT foreign_key
FROM `aros`
WHERE `parent_id` =3
)
How do I do it in CakePHP way of using $this->Model->find();
?