Our forum has a unique need that we must not be able to see the user’s real name, for legal reasons.
We’re using this plugin - SX User Name Security – WordPress plugin | WordPress.org - to generate a random displayname in wordpress. Is it possible to override discourse’s use of the username, and use the displayname instead?
(If not, does anyone know of a way to generate random username in wp instead?)
We are using wp as the sso provider. Its default is to use the real name if present, so it’s ignoring the displayname when there’s a real name (which there always will be).
The WordPress rules for display names do not match the Discourse rules for usernames, for example, spaces are allowed in WordPress display names. Passing the display name as the Discourse username for SSO login isn’t a feature that will be added to the plugin, but it is possible that it makes sense for your case.
The WP Discourse plugin has a wpdc_sso_params filter that can be used to adjust the SSO parameters that are passed to Discourse. This search will get you to a few examples of how that filter can be used: Search results for 'wpdc_sso_params' - Discourse Meta. The changes needed for this could be added to your site’s theme or to a plugin that extends the WP Discourse plugin. You could try posting in our marketplace category to find someone to do the work for you.