Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod Pro
- » MetaMod Pro General Support
- » Module to be displayed for more than...
Module to be displayed for more than one particular user
Module to be displayed for more than one particular user
Hi Stephen,
I guess the recipe will be silimar to this http://www.metamodpro.com/metamod/recip … -logged-in , but where I should put the additional users?
Regards,
Mariusz
24-Jul-10 11:37:50
Re: Module to be displayed for more than one particular user
Hi mariuszstach,
Try this:
// note: double quotes around the outside,
// single quotes surrounding each username.
$usernames = "'some_guy23','another1','person3'";
$query = "SELECT username "
. " FROM #__session WHERE username in ($usernames) "
. " AND guest = 0 "
. " AND client_id = 0 ;" ;
$db->setQuery( $query );
$found = $db->loadAssoc();
if (is_array($found)) return 101; /* found him. customise to your own module number. */
return 102; /* didn't find him. Customise to your own module number. */
- Index
- » MetaMod Pro
- » MetaMod Pro General Support
- » Module to be displayed for more than...
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5943
- Total Posts Today:
- 1
- User Info:
- Total Users:
- 7638
- Newest User:
- moner86658
- Members Online:
- 0
- Guests Online:
- 176
- 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