Clean Share URL – per-user opt-out of username attribution

:information_source: Summary Let users remove their username from generated share links
:hammer_and_wrench: Repository https://github.com/scavin/discourse-clean-share-url
:question: Install Guide How to install a theme or theme component
:open_book: New to Discourse Themes? Beginner’s guide to using Discourse Themes

Install this theme component

Clean Share URL adds an optional setting under Preferences → Interface:

Hide my username in shared links

By default, Discourse’s behavior remains unchanged:

/t/topic/123?u=username

When a user enables the preference, the component removes the u parameter:

/t/topic/123

Other users continue to receive share attribution and related badge progress normally.

Configuration

Before using the component, create an optional, editable Confirmation / Checkbox custom user field.(/admin/config/user-fields)

Find its numeric ID in the field’s edit URL and enter that number in the component’s clean_share_url setting.

2 Likes