Website membership: content based on user

6 posts by 3 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: May 15, 2012   (RSS)

Hello,

I created an extra field in my User Accounts section called "Assets", it's an upload field.

How can I restrict that each user only sees his uploads when logging in?

I already succesfully implemented the membership plugin...

But what goes between this

<?php if ($CURRENT_USER): ?>
???
<?php endif ?>

Re: [Jason] Website membership: content based on user

THANKS! Jason

Re: [videopixel] Website membership: content based on user

By videopixel - December 21, 2011 - edited: December 21, 2011

Everything works Jason...

Just 1 last question about this topic:

Is it possible that the "Admin" can see all assets when logged in?

Re: [videopixel] Website membership: content based on user

By Jason - December 22, 2011

Hi,

Sure, you could check for isAdmin. If the user is an admin, you could retrieve all user records and display the assets for everything returned:


<?php if ($CURRENT_USER['isAdmin']): ?>
// get all account records and display assets.
<?php endif ?>


Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Website membership: content based on user

By RGC - May 15, 2012

I was looking for code that would display a members business logo when logged into the membership section of the web site. This code did the trick.

Thanks Jason
Rod