Can't show groups a user belongs to
nadavoid - May 7, 2009 - 02:54
| Project: | Organic groups |
| Version: | 6.x-2.0-rc1 |
| Component: | Og Views |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
I'm trying to create a view that lists the groups that a user is a member of. Not My groups, but groups of a particular member. This view would be useful, for example, as a block on the side of a profile page.
I am using an argument: "User: Uid"
I have tried using relationship provided by og: "Organic groups: Group node (member)"
The closest I have been able to get is this: I can get the groups that the user owns ("manages").
Is there already a way to do this, and I'm just missing it? If so, I would appreciate any pointers.
Or, please let me know if this functionality is not yet present, and I will change this to a feature request.
Thanks!

#1
I need to do the same thing, did you have any success?
#2
No, I haven't yet.
#3
Actually this isn't that difficult and easy accomplished with a block view.
* create a block view to display USERS
* as argument choose 'provide default argument' and then 'user ID from url'
* next, create a relationship, choose organic groups (group node relationship, probably the only checkbox)
* now you will be able to add a field -> node -> title - don't forget to use the group node relationship!
that's it. You don't even need a filter. Next you will want to display this block on user profile pages like 'user/8'
The difficulty in using relationships is you not necessarily need to start with the content-type you need to end up with.
#4
It works for Me, even to show Group: Members count field..
#5
I'm fuzzy about the steps you're saying to take to make this view.
1. block view to display users, as opposed to node? I thought we're trying to make a list of groups (which the user belongs to, which are nodes) not users?
2. Where do you see "provide default argument"? I chose "User: UID" and this excluded all groups the user didnt create.
Thanks for any help you can offer
#6
Figured it out - here's some clarification of askibinski's solution
1. create new view of type "User"
2. Click the plus image under "Arguments" to add a new argument of "UID"
3. (You will get errors popping up at this point, but just disregard them)
4. Create a relationship: Organic Groups: Group node (Member)
5. Add a field - I added "node: title" and "organic groups: organic group description"
6. I created a new display of page (I know, OP was asking about block. I was interested in page view.)
7. Path: "user/%/mygroups" to pass the argument to the page
8. Menu: "Tab: My Groups"