Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » Visible to Single user ID or username
Visible to Single user ID or username
Re: Visible to Single user ID or username
Try it this way:
if ($user->username == "football") return 344;
Note 1: you have to use a double "=" sign
Note 2: this detects the login name of the user, not their full name.
Also, make sure you follow the instructions in the Quick Start guide. If all users were able to see the module with the PHP you used above, then you probably didn't have it set up right.
http://www.metamodpro.com/metamod/quick-start
Cheers,
Stephen
Re: Visible to Single user ID or username
I'm having similar difficulties. I have a site in which I want to show a roktabs module containing report articles to a specific registered user. User1 gets to see the module with his reports, user2 gets to see only his reports, and unlogged users see some standard text.
I have been using the single user recipe - but there are two problems:
1)If user1 logs in, user1 can see his module, but so can anyone else who goes to the site when user1 is logged in.
2)I'm also having problems modifying the code so that metamod can identify a single user from multiple users and return only the module specific to that individual, as in the logic "if user1, show user1 reports, else if user2, show user2 reports."
Any help would be much appreciated.
Thanks,
Andrew
- Index
- » MetaMod
- » MetaMod General Support
- » Visible to Single user ID or username
Board Info
- Board Stats:
- Total Topics:
- 1700
- Total Polls:
- 6
- Total Posts:
- 5967
- Total Posts Today:
- 1
- User Info:
- Total Users:
- 8052
- Newest User:
- maarie443
- Members Online:
- 0
- Guests Online:
- 350
- Online:
- There are no members online
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked