Export User Information List

(Arpit Jalan) #1

Want to export user information list in a CSV file? Great, let’s get started!

  1. Go to /admin/users/list page, and click on Export Users button:

  1. Shortly you will receive a PM containing download link for exported CSV file:

Note: The CSV file download link will expire after 48 hours, so make sure to download it before 48 hours after initiating export.

  1. Download and open the CSV file:

The CSV file will contain user information.

Congratulations! You have exported user information list successfully.

'we miss you' email to members
Email Address Export of Forum Members - for Survey?
(Wally) #2

Well, that’s nice but how come I don’t see this Export Users button in my Administration panel? I am using a discoursehosting.com installation. Is it some new feature or what?

(Jeff Atwood) #3

Yes, it is a new feature. If you were self hosted you could just press the “upgrade” button on /admin/upgrade – but I think discoursehosting updates fairly frequently.

(Michael - DiscourseHosting.com) #4

We just finished testing the new version - we’ll be updating all instances to in the next 24 hours.

(David García-Navas) #5

In our organization we care about the participation of each co-worker in the internal social network, so we do a monthly report with Topics Viewed and Posts Read and Read Time.

This feature is great because it facilitates the process but it could be better if it would add this data. In addition, it would be even better if it could contain Topics, Posts, Likes Given and Likes Received.

Is this plugin territory?

Extended user stats export list plugin
[Solved]: Need a developer for several Discourse projects / customization
(Jeff Atwood) #6

Not opposed to what you are proposing, but I also suspect you could write a little app that would query that information from the Discourse API pretty easily.

(Arpit Jalan) #7

Here you go:

Enjoy extended user stats! :confetti_ball:

(Lisa Wess) #8

Is it possible to get this export to include the user’s title?

(Arpit Jalan) #9

Sure! :gift:

(Jeff Atwood) #10

Why don’t we just include every user field in the export? Including custom user fields.

(Kane York) #11

Actually, this is kind of a case for custom reports on the forum, possibly through admin-defined SQL?

I should revisit that idea of porting the SE data explorer.

(Arpit Jalan) #12

Okay, here are some more improvements:

  • Added custom user fields.

  • Added header title for each column.

  • Added following additional user fields: trust_level, active, admin, moderator, ip_address.

(Chris Anderson) #13

The file extension for me is .csv.gz (user-list-150521-195707-1.csv.gz – 2.7 KB), and when I open in Excel it displays random characters. Expected behavior?

(Mittineague) #14

I’m not familiar with Excel to know if it unzips compressed files, but it sounds like it didn’t.

Try unzipping it to a “.csv” file and try it again.

(Chris Anderson) #15

Thanks @Mittineague I guess I’ll need a file extraction app, will hunt around as I don’t think it’s native on win. 8.1.

(Jake Shadle) #16

It’s just GZIP compressed, you can use WinRAR

(Mittineague) #17

I have PHP on localhost and hard-code the filenames as needed (yes, hacky, but I don’t use it often enough to bother making it nicer)

$readfilename = "user-archive-Mittineague-150222-090655-52.csv.gz";
$writefilename = "user-archive-Mittineague-150222-090655-52.csv";

$filecontent = "";

$filepointer = gzopen($readfilename, "rb");
while (!gzeof($filepointer)) {
	$contentline = gzgets($filepointer);
	$filecontent .= $contentline;

$filehandle = fopen($writefilename, "wb");
fwrite($filehandle, $filecontent);

(Tobias Eigen) #18

@techAPJ would it be possible to add last seen date in the user export? This would be immensely useful for our community.

(Arpit Jalan) #19

Okay, I just added three new fields: last_seen_at, last_posted_at, last_emailed_at to the user list export!


(Tobias Eigen) #20

awesome - many, many thanks. :sunny: