Create user roles and profiles in Codeigniter using Ion Auth

此生再无相见时 提交于 2019-12-01 20:48:22

I had the same problem before, what I ended up doing was building relation tables to handle different groups with different fields. Then I modified the profile() code a bit, to join the additional relation table according to the user's group settings.

I would start off building a relational database.

example:

**volunteers table**
id
user_id
languages

**organizations table**
id
user_id
mission

Then depending on user group, join the table in profile() function.

Hope this helps!

Ben Edmunds

I would recommend just adding all the fields you need into the meta table and only updating the ones you need per user group. If you need multiple groups per user check out Ion Auth v2.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!