We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

How to assign certain roles to certain user group in Phlacon.

I am using INVO as my project's skeleton code.. I want assign certain roles to certain user groups i.e,, Create user , edit user , delete users

i have multiple user groups(more than 4) how can i assign specific roles to specific usergroups(can be know at the time of login) so that others cannot access the roles.

edited Oct '16

https://docs.phalcon.io/pl/latest/reference/acl.html

There are docs. If your user is object like some model just save the role they have in database(add such a column in database with their role). On login save logged user in cache with session as key or something(so you don't need to fetch it each request), or just in session, and use https://docs.phalcon.io/pl/latest/reference/acl.html#objects-as-role-name-and-resource-name

Im using it this way in my application and it's really nice.