Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

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

Edited By: mariuszstach
24-Jul-10 11:37:50

mariuszstach
Beginner Modder
ranks
useravatar
Offline
12 Posts
Administrator has disabled public posting

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. */

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3329 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1698
Total Polls:
6
Total Posts:
5944
Posts this week:
4
User Info:
 
Total Users:
5543
Newest User:
aj88
Members Online:
1
Guests Online:
120

Online: 
aj88

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked