Limiting user list in User element plugin

darkroast

Member
I have an application which uses the user element plugin. It's working fine, but in the dropdown, it lists all of the users in the system, regardless of whether they are enabled / disabled, blocked or not, etc. Is it possible to limit that list to just "live" users?

A related question: in one application, I'd like to display the users only from one user group. AFAIK, there's no way to do so in the plug in as it is; is there a way to add that function? Is it something that might be useful enough to add to the plugin itself?
 
You can use a dbjoin element to #_users and add your conditions in Data - where.
 
Hmmm... That would work well, except one thing I forgot to mention. I want to use the field to capture the current user when the record is first created. I'm also using a separate repeating group to capture followup information, and I use the user plugin there as well. (This is in addition to being able to choose the user).

As I think about what you said, perhaps I could use that idea as a starting point; what I would then need to do is use an eval default to grab the current user's ID (which is what get's stored anyway). Then, if someone edits the record, they would see a dropdown of user names with the filter (assuming they have edit rights for that field).

If I did it that way, what would I want to use for the default there?
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top