User Access Control - I Need Some Expert Help

13 posts by 4 authors in: Forums > CMS Builder
Last Post: May 25, 2012   (RSS)

Re: [robin] User Access Control - I Need Some Expert Help

By Perchpole - May 24, 2012

Hi, Robin -

Thanks for this. It seems to work well.

My only concern is the issue of the non $CURRENT_USER...

I can understand why the system would break when a $CURRENT_USER attempted to create a record (because the editor couldn't build the category list, etc..) but I can't quite get my head around why an ordinary visitor to the site would also trigger the same problem?

Visitors aren't interacting with the back-end of CMSB - so why are they seeing the same MySQL error?

:oS

Perch

By robin - May 25, 2012

Hey Perch,

CMS Builder will often still use list code even when people are just accessing the data. Is it a MySQL error or a php error due to $CURRENT_USER not being set? A strategic @ should take care of the php problem:

$categoryAccess = join( ",", explode( "\t", trim( @$CURRENT_USER['categoryAccess'], "\t" ) ) );

Hope that helps,
Robin
Robin
Programmer
interactivetools.com