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:
- 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.
- 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)
- 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
- OG membership: Group ID
- Under Block Setings change access to ‘OG permission’
- OG permission: Approve and deny subscription
- Group type: Content
- Under Pager set Use pager to ‘Display all items’
- Offset: 0
- Under Title change Title to: ‘Pending membership(s)’
- 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’
- Content: Nid
- Under Fields remove:
- Content: Title
- 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’
- User: Active
- Under Sort Criteria add:
- User: Name
- Relationship: ‘Do not use a relationship’
- Sort ascending
- User: Name
- 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:
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion