1. Fabrik 3.9 has been released. If you have updated Joomla to 3.9, this is a required update.
    Dismiss Notice

Filter User Element to show only Enabled users

Discussion in 'Community' started by bggann, Jul 28, 2020.

  1. bggann

    bggann Member

    Level: Community
    I'm using the user plugin on a form rendered as a dropdown and I'd like to limit the users show ONLY those users who are enabled in Joomla. Currently the dropdown shows all users in Joomla, regardless of enabled state.

    I have 'stale' users - people who are no longer active and I want them to not show up on the users dropdown list, but I cannot 'delete' the users because I need to preserve data integrity - some records in the lists will have those user id's referenced and I need to preserve that data.
     
  2. juuser

    juuser Active Member

    Level: Community
    Hi, use databasejoin element instead and choose Joomla users database (#_users) as a source table in element settings "Data tab".
    And in "Data - where" tab "Joins where and/or order by statement (SQL)" field add {thistable}.block = 0
     
  3. bggann

    bggann Member

    Level: Community
    Yeah - I prototyped this yesterday after I posted this and it does work. I do try to avoid accessing core Joomla tables from Fabrik, but as read only it should be okay.
     
  4. juuser

    juuser Active Member

    Level: Community
    Yup, cannot see any downsides just linking databasejoin element to core tables.
     

Share This Page