Closed (fixed)
Project:
Drupal core
Version:
5.1
Component:
user.module
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
4 Jul 2007 at 21:27 UTC
Updated:
19 Feb 2008 at 12:20 UTC
Ok I the Display I am trying to get it
Admin
*Name
*Name
Mod< There Role
*Name
*Name
I would out how to list the roles with the code here.
<?php
print "<br>3";
$rid3 = 3;
$result = db_query("SELECT u.uid, u.name, u.status FROM {users} u
INNER JOIN {users_roles} ur ON u.uid=ur.uid WHERE ur.rid = %d
AND u.status = 1", $rid3);
while ($u = db_fetch_object($result)) {
$items[] = l($u->name, "user/" . $u->uid);
}
print theme('item_list', $items);
$items = "";
print "<br>4";
$rid4 = 4;
$result = db_query("SELECT u.uid, u.name, u.status FROM {users} u
INNER JOIN {users_roles} ur ON u.uid=ur.uid WHERE ur.rid = %d
AND u.status = 1", $rid4);
while ($u = db_fetch_object($result)) {
$items[] = l($u->name, "user/" . $u->uid);
print theme('item_list', $items);
$items = "";
}
print "<br>5";
$rid5 = 5;
$result = db_query("SELECT u.uid, u.name, u.status FROM {users} u
INNER JOIN {users_roles} ur ON u.uid=ur.uid WHERE ur.rid = %d
AND u.status = 1", $rid5);
while ($u = db_fetch_object($result)) {
$items[] = l($u->name, "user/" . $u->uid);
print theme('item_list', $items);
$items = "";
}
print "<br>6";
$rid6 = 6;
$result = db_query("SELECT u.uid, u.name, u.status FROM {users} u
INNER JOIN {users_roles} ur ON u.uid=ur.uid WHERE ur.rid = %d
AND u.status = 1", $rid6);
while ($u = db_fetch_object($result)) {
$items[] = l($u->name, "user/" . $u->uid);
print theme('item_list', $items);
$items = "";
}
?>but I can not work out how to add the the db_query if they are online right at this time or not?
I also belive this could be a good feature to add onto Drupal.
Comments
Comment #1
CreativeMe commentedNo idea what happand on the 1st message...
I would like to display there roles that are online like
Admin< Roles
*Name
*Name
Mod< Role
*Name
*Name
I have out work out to get there role but can not work out the sql to get it to check if they online or not
Comment #2
CreativeMe commentedWhat have i done wrong?
Comment #3
ricabrantes commentedNo activity, Closed....