#1 February 14, 2015 9:17pm

pier
Member
Registered: February 12, 2015
Posts: 17

Users in the front end

I'd like to see if I can use the user functionalities from BigTree CMS to also manage users for the public site.

I've been looking into the code reference but I haven't found any sort of methods for checking users, permissions, and so forth.

Is there anything already done in this front?

In the demo site there is a top bar that shows my type of user. Where is the php code that shows that?

Thanks!

Offline

#2 February 15, 2015 3:05pm

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 974

Re: Users in the front end

You could technically use the admin side Users section to power a front end user login and leave those users at level 0 with no module or page permissions but it's not the safest route. In the event that any security bugs were found that allow privilege escalation from level 0 you could potentially have your admin side compromised by using the same system for both front end and admin side users which is why we don't normally go that route.

If you do choose to use that system, the BigTreeAdmin class provides authentication (in the constructor), login via the login method (though you'll need to set a session variable to ensure the redirect doesn't send users to the admin), and user creation via createUser.

The bar drawn across the front end of the site is another issue you'll run into with using the admin user system for front end auth -- it's drawn near the bottom of /core/router.php -- you'll need to override the router in /custom/router.php to remove that bar from being drawn.

Offline

#3 February 15, 2015 5:14pm

pier
Member
Registered: February 12, 2015
Posts: 17

Re: Users in the front end

Thanks, you are right. It's best to have that on a different security layer.

It would be a great addition to the CMS btw wink

Offline

Board footer

Powered by FluxBB

The Discussion Forum is not available on displays of this size.