php - Codeigniter + Ion Auth - Are "groups" relevant in my case? -
i using codeigniter homemade authentification system switch ion auth.
every user's account attached company's account. company's account can have > 1 user's account attached.
example:
- company 1 => user id 1, user id 2, user id 3 - company 2 => user id 4
etc
is "groups" function in ion auth relevant storing company data? can, therefore, use "users" table in order save users , "groups" table in order save companies. choice relevant?
you can use groups define company , create additional fields in users table (or separate) company data;
then can use below check if user in particular company/group
if ($this->ion_auth->in_group("company1")){ //your company stuff here }
Comments
Post a Comment