Is it possible to filter in Views for users that are registered on a certain domain ? (like filtering for organic group members)
thanks for this cool module!
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 369928-views-filter.patch | 4.49 KB | agentrickard |
Is it possible to filter in Views for users that are registered on a certain domain ? (like filtering for organic group members)
thanks for this cool module!
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 369928-views-filter.patch | 4.49 KB | agentrickard |
Comments
Comment #1
agentrickardIt is theoretically possible, but I do not believe that Domain Views supports this yet. You would write a views handler for the {domain_editor} table.
Comment #2
agentrickardComment #3
agentrickardHere's a patch that provides arguments and filters for user domain assignments.
Comment #4
agentrickardThis patch is tangled up with #397116: Views relationships and DA.
Comment #5
ayalon commentedHi agentrickard
Thanks for this patch. I tested it and it worked.
Maybe one could make the whole thing a bit more obvious :-)
I debugged more than an hour to find out, that the user domains are saved in a table domain_editor. Then I found out, that I should use the Domain Editor Filter to filter out users form a certain domain.
For a new user this is not very obvious because registered user normally aren't super users / editors.
But there are good news: It works also with "relationships". I have a list of "My friends" but I wanted to show only friends form the current page. So I used the User Relationship "requestee" and voilà: It worked!
Taxonomy?
Now I need the same thing for taxonomy. Means I need to filter taxonomy terms by domain. Is this feature planned too?
Comment #6
agentrickardThanks for the review!
The problem is that Domain User is taken (by another module). And the assignment of users to domains is normally done for editing purposes. What other label would you suggest?
Taxonomy is handled entirely by the Domain Taxonomy module, which is its own release. I have no plans to integrate that.
Comment #7
ayalon commentedDomain User would be the best. But because its taken we could rename it to Domain Users or Domain User Filter. Or Domain User Realm..
Comment #8
nonsieI personally thing we should stick to the labels in the patch so that we do not confuse Domain Access editor grants with Domain User or Domain User Default.
The patch applies and works as expected but I am unsure about #397116: Views relationships and DA part in it.
Could you possibly split it into two patches?
Comment #9
agentrickardI don't think I can split it.
Comment #10
agentrickardI went ahead and committed both to HEAD.
Comment #11
ayalon commentedGood idea! Works well on my system!