You are here

function spaces_user_context_prefix_prefixes in Spaces 5.2

Implementation of hook_context_prefix_prefixes().

File

./spaces_user.module, line 259

Code

function spaces_user_context_prefix_prefixes($reset = FALSE) {
  static $prefixes;
  if (!isset($prefixes) || $reset) {
    $prefixes = array();
    $result = db_query("SELECT uid, name FROM {users} WHERE status = 1");
    while ($row = db_fetch_object($result)) {
      $prefixes[] = array(
        'prefix' => 'space-' . spaces_user_make_prefix($row->name),
        'id' => $row->uid,
      );
    }
  }
  return array(
    'spaces_user' => $prefixes,
  );
}