"Share a link" for a post should not leak username

Sorry, but I’m not following.

For me, the ?u=mittineague can easily be removed with an edit - if I wanted to not have it for a post I was referring to, and alternatively it could be removed by script - if I wanted to not have it for any posts referred to by anyone.

Personally, if I care enough to refer to a post, I really don’t care if others know that it was me that referred to it. That is, I don’t understand how this could be a source of a “privacy” problem. Please post an example of how this can be a problem.

1 Like

I think that the logic is that If they shared the link publicly, e.g, on twitter, then it’d be public that they’d shared it anyway. But your logic is different.

Well this would first of all leak a connection between maybe otherwise uncorrelated usernames. I may not want to reveal who I am on that forum as I pass on links to a different group of people. I wouldn’t expect that to be revealed.
Also, the name sticks around as the link gets copy-pasted into more places, still pointing to who originally started the reference.

Technically savvy people will easily recognize that their username is in the URL and just remove it, but I wouldn’t expect non-technical people to know that they can modify a URL like that and still have it point to the same thing.

1 Like

I tried this in another forum where I am admin, and it does not work. When I click on a post’s time and copy what I get, it still adds ?u=... to the URL.

That script will remove the username from “share a link to this post” button only. Not in the time link. If you like to remove that then you have to add some extra modifications.


Could there be a user-preferences feature to disable username tracking for users who don’t want it? I don’t want my username in my timestamp links. I can manually edit the URL but that is annoying and error prone.


I can think of a forum where this would be appreciated too. :+1:

I think a use-case example would be a forum where you don’t mind people knowing you read it in general, but where you don’t want people to link you to your actual posts (eg. a sexual advice forum or a mental health one).

I think it is possible to create a small theme component to override this function. FTR, it will remove the username from the URL if you disable the badges in site settings.


It would be nice to be able to make sure that each user has a different referral code instead of their nickname. I mean for example my nickname is bigluke97 but my referral link is hrt72skd0. So that my referral link will be for example: ?u=hrt72skd0 and the system will know it was me(bigluke97), so that only staff members would know who a specific referall code is linked to, but not other users. It does not make it completely anonymous, but at least it does not directly show the username which is much more public.

I honestly see no problem with having the username as a code in the link, but it would still be a very nice privacy-focused idea in my opinion.


I can support a site setting here @zogstrip can we slot this for the next release?


Slotted to next release.

Can you expand?

  • Site setting to completely disable appending of ?u=sam to links discourse renders when you click the chain icon


  • Per user setting?

Wouldn’t the anonymized referral links that @yhh9xdq7d suggested provide most or all of the privacy benefits while not removing functionality (tracking referrals)? Is there a reason a site setting to completely disable referral links would be more desirable?


This is what I’m thinking. Simple and clean. Per user doesn’t make sense to me, we already have options explosion on the user preferences sadly… :sob:


Sadly this proposed obsfucation implementation is significantly more complex, I guess the difference between building the feature in a week or a few hours.

Plus it does not address the fundamental privacy concern


I was thinking about it from the perspective of leaking information out of the community, but I guess leaking info to the admins is a factor too, depending on the community and the individual.

Personally, I trust the admins of the site I use enough to not care if they see me sharing links. I mostly remove my username from the URL when sharing links outside the community itself, and even then that’s more to keep the URL clean than to hide the fact that it was me who shared it.

Fair enough!


The problem is not that administrators see who you bring to the community, but that other users who read your link (for example, shared on social networks) know who you are in the forum, or not? So, I think that it would be enough to simply make sure that each user has a “referal id/code” random and not the same as their nickname, but associated with their nickname. This would probably also be the easiest, fastest and most functional solution with a hint of privacy.

Would just obfuscating the username so it wasn’t obviously a username work? Then you can continue to track without exposing any public info?

1 Like

Is it possible to disable this now?

Now we have a site setting to disable the username.