Jump to content

Frontend user login and access levels


Pete Jones
 Share

Recommended Posts

Hi,

We're looking at creating a 3 level (guest, member, admin) user levels for accessing frontend content via a login.

I have seen https://processwire.com/talk/topic/107-custom-login/page-1 which talks about creating the user login page. I have also seen http://modules.processwire.com/modules/frontend-user/ which is an older module which seemingly handles this but is still in alpha.

We are creating a system where users need to login to see comments (members) but admin users are able to see additional information on some pages. What I'm looking for is something a little like:

if ($user->role == 'admin') {

//SHOW DETAILED INFORMATION

} else {

//SHOW  BASIC INFORMATION

}

Can we hook into the User roles to do this?

Thanks

Pete

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...