You are here

function subuser_listall in Subuser 5

1 string reference to 'subuser_listall'
subuser_menu in ./subuser.module
Implementation of hook_menu()

File

./subuser.module, line 85

Code

function subuser_listall() {
  global $user;
  $header = array(
    "Username",
    "Edit",
    "Delete",
  );
  $myUID = $user->uid;
  $result = db_query("SELECT u.uid,u.name FROM {users} u, {subuser} su WHERE u.uid=su.uid AND refuid='%s'", $myUID);
  while ($account = db_fetch_object($result)) {
    $rows[] = array(
      $account->name,
      l("Edit", "subuser/{$account->uid}/edit"),
      l("Delete", "subuser/{$account->uid}/delete"),
    );
  }
  return theme('table', $header, $rows);
}