Limit record listings based on record field in User File

3 posts by 3 authors in: Forums > CMS Builder
Last Post: November 28, 2011   (RSS)

By nmsinc - November 25, 2011 - edited: November 25, 2011

I have all users set to “editor” so that they can access and edit all files within a company group. [/#000000]

[/#000000]

I now need to know how I can limit a users access to record listings within CMS to only the company they are assigned too (company assignment is made within USER section) – any ideas anyone? [/#000000]

[/#000000]

Thanks - nmsinc[/#000000]
nmsinc

Re: [nmsinc] Limit record listings based on record field in User File

Hi nmsinc,

If you're using the Website Membership plugin, you might be able to get away with something like this simple line of code in the PHP block at the top of your restricted page.

<?php if ($CURRENT_USER['your_field'] == "your_value"): ?>Current user will be able to see this<?php endif ?>

There are lots of tips and tricks about how to implement the membership plugin in my CMSB Cookbook http://www.thecmsbcookbook.com

Hope that helps.

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php