Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
we need an og autocomplete like the standard user autocomplete but restricted to just group subscribers. needed when assigning stuff to group members from casetracker module (for example).
Comment | File | Size | Author |
---|---|---|---|
#5 | 61633-og_user_autocomplete-callback.patch | 6.21 KB | mradcliffe |
Comments
Comment #1
mradcliffeWould this still be in scope for Organic groups? I know there is a group/autocomplete, but that is different.
I wrote up a sub-module (and tests) to do this, but it might be useful for other mod developers in Og core. It would be trivial to change it around as a patch to Og instead only if it's in scope (I have tests written already).
Basically... group/user/autocomplete/n/string where n is gid and string is a potential sub string of user name. Query joining users table and og_membership table with an access callback for if the caller is in the group. The latter may be out of scope and can be easily modified by any module.
If this is out of scope, then we can close this issue. ;-)
Comment #2
amitaibu@moshe,
Isn't it something User reference + Views can do -- so you can have your own logic to which users can be referenced?
@mradcliffe,
You can always share your code here, even if it doen't get into OG core, someone might enjoy it.
Comment #3
mradcliffeSorry, I bumped this thread up from 5 years ago because it was relevant. He probably hasn't thought about it since Drupal 6 was released in 2008.
Comment #4
amitaibuoh, haven't seen the date ;)
Comment #5
mradcliffeHere is a patch to og from local branch og_user_autocomplete to origin/7.x-1.x.
There isn't any place yet to use it in current og except maybe removing a user via a textfield via a future og actions form.