Users running a non-download version of Vanilla (pulled from github), on branch release/2019.016 or master from the last 2 weeks should upgrade to release/2019.017 or latest master for security reasons. Downloaded official open sources releases are not affected.
Please upgrade here. These earlier versions are no longer being updated and have security issues.

user list shows a lot of duplicate users

This discussion is related to the User List addon.
horia_mhoria_m New
edited February 2011 in Vanilla 2.0 - 2.8
I just installed 2 days ago vanilla and your plugin.
The list of users shows duplicate users, so that instead of abut 7 it shows about 20.
can this be fixed?
(my version of the plugin is very recent)
thank you!


  • Noone around here?

    I checked the database, and there are no duplicate users there (in the "Users" table that i found). So, why is this happening?
  • I have also had this problem. I guess some people have just seen what it does and then just take the plugin out. :-/

    Gonna have a quick look now to see if I can actually fix anything. I'll post in a little while.
  • Found the issue. What the plugin does, and this is just a guess, but it looks through all the roles and then returns the names in each role. So, this means that if you have one user in two roles, it will return the user twice.

    This might be because you have some users listed as a member AND Admin, or Mod. Something like that.

    This really is a problem as it means a messy database with too many Roles. For the moment, just take the member role away from anyone that has a second role. That should fix it.
  • Just installed and found the same issue. I have all my users in two or more roles, so every single user is at least doubling up. That's no good.
  • @Gig: thank you for explaining the bug! I'll see if turning off some roles does not affect the functionality for those users.
  • /plugins/UserList/class.userlistmodule.php
         $this->Users = $SQL
    ->Distinct() // add
    ->Join('UserRole r','u.UserID = r.UserID')

    $this->All_Users = $SQL
    ->Distinct() // add
    ->From('User u')
    ->Join('UserRole r', 'u.UserID = r.UserID')
  • thank you, yu_tang! That's great. I will use this code.
  • I tested it, and it works well now! Thank you again, yu_tang!
Sign In or Register to comment.