User Specific Content

5 posts by 2 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: June 20, 2013   (RSS)

Hey Guys,

I have the Members plugin installed and working.  I'm using it to show different content for different login accounts (and only specific to each user).  I have this working it seems but it's only showing 1 record and not all for a specific user.  I have the original "User Accounts" table and a new table called "User Information".  One of the fields in "User Information" is a select field that shows all "User Accounts" plus the content for each user.  I'm sure i'm missing something to show "all" records for that specific user.

Attached is the code for the landing page "After" the user has logged in.  Let me know what's wrong, thanks!

Attachments:

user-info.php 4K

By ross - June 19, 2013

Hi Jeff

Thanks for posting! I've had a look at your code and I think I see the issue. Your "where" statement is searching based on the num field:

'where'       => "num = '".intval($CURRENT_USER['num'])."'",

I think what you want to be searching on instead is the "createdByUserNum" like this:

'where'       => "createdByUserNum= '".intval($CURRENT_USER['num'])."'",

Give that a go and let me know how you make out. Thanks!

-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Hey Ross, I tried that but it now returns "No records were found!" when logged in.

Hey Ross, yes that worked great, I appreciate the great service as always.