I didn't find out the answer on the doc, so here i am.
Does the SimpleAuth package allow users to belong to mutiple group ? I guess it's possible because the SimpleAuth Auth::get_groups return an array and the doc say about it : "The get_groups method returns the user groupS assigned to the currently logged-in user"
But how to set multiples groups to an user (I mean, the sql group field from the users table is a simple INT ? ) ? Thanks a lot.
No. Both Simpleauth and Ormauth only support a single group.
But are designed to use roles to assign permissions. In case of Simpleauth, thats it, in case of Ormauth you can also assign permissions to a user directly, or to a group.
This looks like an error in the docs, get_groups() returns an array with two values, the group driver ID and the users group ID (singular).
Well thanks Harro, so to speak by metaphor, if i have a group "Duck" and a group "Hunter", and i want a duck to be able to hunt others ducks, i have to create a "Hunter-Duck" group and manually re-attributes rights and action ? Or there is another way ?
Groups are arbitairy collections of accounts, such as users, guests, etc. A role is a function you perform (within the context of the application) for which you as a use get assigned the permission associated with a role. A user can have an unlimited number of roles.
In Simpleauth you can not assign permissions to groups, only roles (hence the name, "simple"), so it can only uses for simple purposes, like distinguish guests from users...