I'm new here and this is my first question.
First of all I apologize for my poor English.
I would like to create an application using userfrosting 0.3.0 where:
UserFrosting, as of version 0.3.1, does not have built-in support for group hierarchies. However, it should be pretty easy to implement. Here is how I would do it:
companytable will store information about the companies, with a primary key
company_usertable will associate companies with users, and have four columns:
register() method in
AccountController.php so that when someone registers, it creates a new company and then associates them with this company, marking them as the Administrator of this company by setting
flag_admin to '1'.
Any members that get added to a specific company should also be added to this table, but with
flag_admin set to '0'.
Create a new
manages(user_id_1, user_id_2) which returns
user_id_2 belong to the same company and
flag_admin set to '1',
Grant appropriate permissions to users in group "Administrators" so that they can create/update/delete/view users, but only users in group "Members" and only if the Administrator
manages them (so if "Members" has a group_id of "4", condition=
That should get you started, let me know if you need further clarification.