Disabling full name changes

Hi,

I have just begun operating a small discourse for real life friends and I wanted to enforce a Real Name policy.

I’ve required full name on sign up and an approval only policy, but after sign up users can edit their Full Name. I want to disable this so that an approved user’s full name is essentially locked after sign-up, but an admin can still edit the field.

I was looking at where this check happens and it seems there’s no logic that will let me enforce this policy exactly:

Username and e-mail have settings that relate to whether a user can self-edit them, but there are no such settings for full names. Is this true? Is there some work around?

Thanks!

I have an instance where avatars are handled elsewhere and I changed the preferences template to hide the avatars change section. You can do the same.

I see. That seems like a clean solution.

Was the separate avatar handling page a custom page you’ve added?

Yes, I changed the preferences template, so the little pencil from avatar on preferences page is a link that send people to the avatar change page in another system. Our avatars were handled outside Discourse and integrated with the setting default avatars.

Thanks I think that gives me an idea of how I might proceed.

Interesting. I have a similar requirement for a Membership site.

In my case we will carry over Real Names from a separate site with registration using SSO. We will allow users to adopt usernames for taking part in the Discourse conversation, but we want them to always be linked to a Real Name on their profile, and so do not want them to be able to change it once it has been populated during registration.

Is this possible?

Since you’re using SSO, checking sso overrides name should solve your problem :slight_smile:

thanks! I’m not yet using … but it is the plan I am putting together and so have not discovered that yet. Much obliged

Je cherche depuis 20 minutes et je ne parviens pas à trouver le modèle des préférences. J’ai trouvé des fragments, mais pas le modèle lui-même. Quelqu’un pourrait-il m’indiquer où le trouver ?

Je pense que le modèle fait référence à cette partie de la base de code

Cette partie spécifie l’action qui est exécutée lorsqu’une personne clique sur le grand crayon pour modifier l’avatar.

& voici l’action associée à showAvatarSelector qui pourrait être remplacée si vous souhaitez personnaliser.

J’espère que cela vous aidera !

Merci, mais je pense que @Falco faisait peut-être référence à Admin > Personnaliser > Texte. Par exemple, je peux trouver cet élément :

js.user.change_avatar.title

et je m’attendais à ce qu’il existe également un modèle de niveau supérieur qui définit l’ensemble de la page de préférences de l’utilisateur et contient cet élément. En supprimant la section avatar de ce modèle, on pourrait empêcher les utilisateurs de modifier leur avatar. (Ou leur nom complet, ce que je souhaite faire.)

Mais je n’arrive toujours pas à trouver le modèle qui définit la page de préférences des utilisateurs.

Non, ce que je voulais dire est exactement ce que @weallwegot a mentionné. Vous pouvez apprendre à remplacer des modèles en consultant le Guide du développeur pour les thèmes Discourse.