Scroll through full user list?


I’m fine with that, but it doesn’t seem like an especially robust solution.

1 Like
(Allen - Watchman Monitoring) #8

Right now I have to export a list to see all the people who are approved, but not activated

being able to scroll would be so much better.

(Dan Dascalescu) #9

I would also like the ability to scroll through the full list of (filtered) users in /admin/users.

Anyway, a real UX problem is that there’s no indication that the results are limited to the first 100 matches. This was misleading when I tried to see how many users from a certain domain had registered and eyeballing indicated about 90-100. In reality there were over 400 users, which changes the dimension of the problem somewhat (have moderators send custom welcomes).

1 Like
(Jeff Atwood) #10

Just export the full user list via Admin, Users, Export.

(Dan Dascalescu) #11

Three problems:

  1. That exports the entire list. I wanted to see how many users matched the filter.
  2. Exporting doesn’t resolve the fact that there’s no indication as to the size of the filter results.
  3. The export file is a full CSV dump with all the fields (less user friendly than what a moderator would like), and there’s no clickable link to go to a user’s profile
1 Like
(Allen - Watchman Monitoring) #12

Given how awesome the rest of discourse is, how is this even an answer?

(Mittineague) #13

I put together an admittedly hackish PHP script for personal use early on (about a year and a half ago)

32,908 KB
219952 users

I then created my own “filters” using the available fields

if (($handle = fopen($csv_file, "r")) !== FALSE) {
	$user_arr = [];
    while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
	$user_arr[$data[0]] = ['name' =>	 	(!empty($data[1])) ? $data[1] : "no name",
				'username' =>  		(!empty($data[2])) ? $data[2] : "no username",
				'email' => 		(!empty($data[3])) ? $data[3] : "no email",
				'title' =>  		(!empty($data[4])) ? $data[4] : "no title",
				'created_at' =>  	(!empty($data[5])) ? $data[5] : "no created_at",
				'trust_level' =>  	(!empty($data[6])) ? $data[6] : "no trust_level",
				'active' =>  		(!empty($data[7])) ? $data[7] : "no active",
				'admin' =>  		(!empty($data[8])) ? $data[8] : "no admin",
				'moderator' =>  	(!empty($data[9])) ? $data[9] : "no moderator",
				'ip_address' =>  	(!empty($data[10])) ? $data[10] : "no ip_address",
				'topics_entered' => 	(!empty($data[11])) ? $data[11] : "no topics_entered",
				'posts_read_count' =>	(!empty($data[12])) ? $data[12] : "no posts_read_count",
				'time_read' =>  	(!empty($data[13])) ? $data[13] : "no time_read",
				'topic_count' => 	(!empty($data[14])) ? $data[14] : "no topic_count",
				'post_count' =>  	(!empty($data[15])) ? $data[15] : "no post_count",
				'likes_given' =>  	(!empty($data[16])) ? $data[16] : "no likes_given",
				'likes_received' => 	(!empty($data[17])) ? $data[17] : "no likes_received",
				'group_names' =>  	(!empty($data[18])) ? $data[18] : "no group_names"

* “0” is the id field

(Dan Dascalescu) #14

Here’s a simple Node.js script to delete users that match a given (spam) domain. It makes repeated API requests to bypass the 100 users limit. I wrote more about it at

(Jeff Atwood) #15

I dunno, have you ever scrolled through all Google search results? Sometimes, the question is wrong.

(Allen - Watchman Monitoring) #16

The google search results aren’t paying members of the close forum(s) I manage.

1 Like
(Mittineague) #17

Is this something the Data Explorer plugin could make easy work of?

1 Like
(Dan Dascalescu) #18

Again, Google does indicate there are more than 10 search results. Discourse’s admin does not.

Also, Discourse already has the code to page through users, as can be seen at Discourse Meta.

1 Like
(cpradio) #19

Yes. @dandv, if you can tell me what you typically filter by (or want to be able to filter by), I can create a Data Explorer Query to return what you want.

1 Like
(Dan Dascalescu) #20

Not sure if the reply above was for me or @Mittineague, but I want to filter by username or email address.

What I’m a little surprised by is how come it’s so difficult to reuse the Ember code that does user pagination at /users/ to /admin/users/list/.

(cpradio) #21

What information do you want to retrieve? Username and Email obviously, but what other columns are of interest?

(cpradio) #22

@dandv, does this help you any?

filter-by-username.dcquery.json (330 Bytes)

filter-by-email-address.dcquery.json (329 Bytes)

(Dan Dascalescu) #23

@cpradio: The export is nice, but:

  1. I actually want to perform operations on those users, namely delete and block spammers:

2. The results displayed on the page are limited to 250.

(cpradio) #24

To my knowledge the only way to do bulk operations is via the console, and to utilize that, you probably want to build a list of users to loop through, which the report can continue to help with.

I also never realized there was a limit. But I would have hoped that downloading the results to CSV or JSON would not be limited to 250 (I have no way to test this though, as my sandbox won’t come close to returning that much data).

(Dan Dascalescu) #25

The download does return the entire result set.

I just wish the UI clearly showed the number of results displayed, because otherwise the user may be very misled if the result set is large.

The active users list in Admin has the same problem: only the first 100 users matching a filter are shown, but there’s absolutely no indication of that.

(Mittineague) #26

How long does it take for the export to be put together?
That would give some indication about how long it would take to get an “everything” list into the page.

I think a better approach would be some kind of “filter” eg.
where date < 1 month
offset 250 limit 250

As to # displayed of # possible
seems a count(id) from users
would be easy enough.