Creating a view that displays pending membership(s)

Last updated on
18 May 2024

This is documentation for Drupal 7, which is no longer supported. Learn more and find resources for Drupal 7 sites

To increase the speed of approving pending memberships, it might be useful to show the OG manager the pending memberships in a block. To achieve this, follow these steps:

  1. Set up new View at admin/structure/views and create a Block display of Format Fields and leave the default at Content: Title. We will remove this later.
  2. Under relationships add:
    • OG membership: User from OG membership (no need to require relationship)
    • OG membership: Group content from OG membership (no need to require relationship)
  3. Under Contextual Fiters add:
    • OG membership: Group ID
      • Relationship: Do not use a relationship
      • When the filter value is NOT available:
        • Select ‘Provide default value’
        • Type: Current OG group from context
        • Group type: Content
  4. Under Block Setings change access to ‘OG permission’
    • OG permission: Approve and deny subscription
    • Group type: Content
  5. Under Pager set Use pager to ‘Display all items’
    • Offset: 0
  6. Under Title change Title to: ‘Pending membership(s)’
  7. Under Fields add:
    • Content: Nid
      • Relationship: Group node from OG membership
      • Do NOT create a label
      • Check ‘Exclude from display’
    • User: Name
      • Relationship: ‘Do not use a relationship’
      • Do NOT create a label
      • Rewrite results:
        • Check ‘Output this field as a link’
        • Link path: ‘group/node/[nid]/admin/people’
        • Check ‘Use absolute path’
  8. Under Fields remove:
    • Content: Title
  9. Under Filter Criteria add:
    • User: Active
      • Relationship: ‘Do not use a relationship’
      • Active: ‘Yes’
    • OG membership: State
      • Relationship: ‘Do not use a relationship’
      • Operator: ‘Is one of’
      • Group content state: ‘Pending’
  10. Under Sort Criteria add:
    • User: Name
      • Relationship: ‘Do not use a relationship’
      • Sort ascending
  11. Save your view

If you add this block, the manager of the OG should be able to have a quick look at the pending membership(s) when he is browsing the community.

Help improve this page

Page status: No known problems

You can: