Add external change password link

AI-generated summary

The discussion revolves around adding an external change password link in Discourse’s Account settings, specifically when using WordPress as the Single Sign-On (SSO) provider. thecellmc shared a mockup of the desired feature and asked for ideas on how to implement it.

cpradio suggested a possible solution, referencing a previous discussion on rebuilding user preferences. However, cpradio later expressed uncertainty about the feasibility of this approach when SSO is enabled.

thecellmc attempted to edit the account.hbs file to remove the lines hiding the password field when SSO is enabled, but jomaxro strongly advised against directly editing files, recommending instead to make changes through customizations in /admin or via a plugin.

neil clarified that the account.hbs template is displayed even when SSO is enabled, although the fields might not be editable depending on the settings.

Hello,
I am using Discourse with a WordPress website where WordPress is the SSO provider.
As WordPress is the SSO provider, you can’t change your password within the Discourse user settings.
Would it be possible to add a button, in the Account settings, which links to my main website to that the user can change his password?
Here is a mockup of what I would like to have:

So any ideas about how this would be possible?

This isn’t below, but would appear above all of the preference pages, and it is what we use for our SSO scenario (I should really turn this into a howto)

Hmmm… I’m not 100% sure that setting/template should be loaded when SSO is enabled, so overriding it might not do anything. I know on our Production instance (which isn’t latest), we do not see the Change Password field/setting in our User Preferences.

cc @neil

@cpradio I removed the lines which hide the password field when SSO is enabled.
They are also located in the account.hbs file.

From your posts it sounds like you edited files directly - please don’t do that! 1, if you edited them via the ssh they will simply be overwritten upon the next update. 2, if you edited them in a way that replaced the files upon each update, your going to break something. Please be sure to make changes to Discourse via customizations in /admin or via a plugin.

The account.hbs template will be shown even if SSO is enabled. The fields might not be editable (depending on your settings), but you’ll be able to see their values.