What defines an 'inactive' user?


(Callan Bryant) #1

/admin/users.json lists (presumably with some kind of limit) all users. There is an inactive field, but there is no way to define how long a user must neglect the forum until the user is considered inactive, as far as I can see in the configuration panel.

So when is a user considered inactive?

Where can I find the view/model that produces this output?


(Daniel Gagnon) #2

If I had to guess I’d say long enough to be sent an email with the recent events so it would depend on the frequency set for those.


(Jeff Atwood) #3

I suspect this has to do with activated versus not activated users, not “inactive” in the sense you are discussing it here.


(Callan Bryant) #4

Ah ok, that makes sense. Thanks.

I’ll probably just use the ‘last seen’ field then. However, I’ll have to convert it to a Date or something as it’s in a translated format at the moment – “3d,” “4h” etc. I need to reverse it. I think the code is here discourse/age_words.rb at master · discourse/discourse · GitHub


(Rikki Tooley) #5

IMO apis should always speak in absolutes… datetimes should be converted at the UI layer only. What do you think @codinghorror?


(Callan Bryant) #6

I certainly agree with that. Mostly just because APIs are for machines, not humans. By definition, the UI layer allows interaction.