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).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mradcliffe’s picture

Title: og/autocomplete » group/user/autocomplete
Version: master » 7.x-1.x-dev

Would 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. ;-)

amitaibu’s picture

@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.

mradcliffe’s picture

Sorry, 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.

amitaibu’s picture

oh, haven't seen the date ;)

mradcliffe’s picture

Status: Active » Needs review
FileSize
6.21 KB

Here 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.