Search code examples
phpmysqlcodeigniterauthenticationprofiles

Codeigniter Auth Library - username public profiles for specific group, disabled for other groups


currently working on an application that has 3 distinct user groups. Admins, Entrants and General Users. Admins will have a backend and can do anything, that's ok not a problem.

Entrants must have a username and this will be used as their public profile: domain.com/username ... or a variation of. They also have a private profile in which they can edit.

I do not want general users to have public profiles but they will have a private profile in which they can edit their name, details, etc.

Can anyone recommend one of the many Auth libraries that can best suit this purpose or if i should develop an app like this in Codeigniter at all!!

Overview:

Admins (Max 2 - 3 users) - Access Everything
Entrants - Public Profile(username) / Private Profile
General Users - Private Profile Only

Many thanks and any help/advice is much appreciated. Apologies if it's been asked already.


Solution

  • Personally I always have used Ion_Auth. It does contain distinct user groups and the ability to provide access control depending on the group..

    https://github.com/benedmunds/CodeIgniter-Ion-Auth

    I have also put together an example of its usage here, based on this blog post.