I want to filter cck-nodes (content type name: member) in a view by the status of a user.

I know that i need to define a filter but I dont know how to tell them the right tablename. The field status of a user is in the table users. But how to get the connection with my cck-node "members"?

I'm asking here because you have done the same with the usernode. I hope that's OK. As I can see in the function usernode_views_default_views() you added a filter like

 
    $view->filter = array(
    // ...
    array(
      'tablename' => 'usernode_users',
      'field' => 'status',
      'operator' => '=',
      'options' => '',
      'value' => '1',
    ),
    //..
  );

Now I have a Side helper Module with the function you can see below. It's called from the argument-handlingcode. But its not working. What is wrong with my filter? I think he don't know the tablename. But how can I set up this? How have you done it? Maybe I've misunderstood the way how to define the filter. May you help me with this?

function sitehelper_filter_view_mitglieder(&$view) {
  $view->filter[] = array(
    'tablename' => 'node_users',
    'field' => 'status',
    'operator' => '=',
    'options' => '',
    'value' => '1',
  );
}

Comments

Pomliane’s picture

Status: Active » Closed (won't fix)

This version of Usernode is not supported anymore. The issue is closed for this reason.
Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.

This issue has been automagically closed by a script.