gassim
(Al-Gassim Sharaf Addin)
January 11, 2025, 3:35am
1
Hey
The ‘anonymous users’ table in Data Explorer is returning a list of actual users with user_id. They’re not really ‘anonymous’ nor ‘anonymized.’
It’s not making any sense and I’m trying to understand what this table is and why the random list of 46/11000 users are in that list.
You can run:
SELECT * FROM anonymous_users
This table is referred to on the repo as: discourse/app/models/anonymous_user.rb at main · discourse/discourse · GitHub
Any clue?
Thanks!
Anonymized users are completely wiped of their data, except their actions on the site.
Is this what you were asking?
gassim
(Al-Gassim Sharaf Addin)
January 11, 2025, 3:49am
3
Hi @Quack_Quack_G
Thanks for your response. My question is about the table itself. I understand the idea behind anonymous and anonymized, but when I run the query in data explorer :
SELECT * FROM anonymous_users
I see a list of random users including my account, so I don’t understand what this table itself is and why these users (who are not anonymous nor anonymized) appear there.
Thanks!
1 Like
I’m sorry, I don’t really know about this, I thought you were talking about anonymized users.
Good luck on this!
1 Like
gassim
(Al-Gassim Sharaf Addin)
January 11, 2025, 3:51am
5
It’s okay! Thanks for the help!
The table naming is not making sense so I understand it could even confuse people from understanding my question
1 Like
Moin
January 11, 2025, 7:38am
6
There are 3 cases where users can be anonymous
when they are not logged in
when they were anonymized
when they use anonymous-mode
The table is also mentioned in the admin documentation about anonymous mode.
Finding an anonymous user’s regular account
While anonymous mode provides anonymity in the Discourse user interface, the Discourse database can still associate anonymous accounts with their regular user accounts. Use the following Data Explorer query to find the association:
SELECT a.username AS anonymous_username, u.username AS original_username
FROM users u
JOIN anonymous_users au ON (u.id = au.master_user_id)
JOIN users a ON (a.id = au.user_id)
2 Likes
gassim
(Al-Gassim Sharaf Addin)
January 11, 2025, 2:53pm
7
Hi @Moin
Thank you so much! This is very helpful. Anonymous mode is not enabled in our instance, and I updated the settings again so now I no longer see the list when I run the query. It’s solved now.
Thanks!