Disabling full name changes

AI-generated summary

Disabling Full Name Changes

The discussion revolves around disabling users from changing their full names after sign-up, while allowing admins to edit the field. thekoalaz wants to enforce a Real Name policy on their Discourse instance.

Falco suggested hiding the edit section for full names by modifying the preferences template, similar to how they handled avatars. thekoalaz found this solution helpful and is considering implementing it.

robmc has a similar requirement for a Membership site, where they want to link Real Names to usernames and prevent users from changing them. fefrei suggested using the sso overrides name setting to solve this problem.

The conversation also touches on modifying templates to achieve this goal. Falco clarified that modifying templates requires overwriting the existing code, and weallwegot provided a link to the relevant codebase. Mark_Schmucker is still searching for the template that defines the user’s preference page to remove the full name edit section.

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

20분 동안 찾아보았지만 환경설정 템플릿을 찾을 수 없습니다. 일부 조각은 찾았지만 템플릿 자체는 못 찾았어요. 어디에 있는지 알려주실 수 있나요?

템플릿이 이 코드베이스의 부분을 가리키고 있다고 생각합니다.

이 부분은 아바타를 편집하기 위해 큰 연필 아이콘을 클릭할 때 실행되는 작업을 지정합니다.

그리고 커스터마이징을 원하신다면 교체할 수 있는 showAvatarSelector에 연결된 작업은 여기 있습니다.

도움이 되셨으면 좋겠습니다!

감사합니다. 하지만 @Falco가 Admin > Customize > Text를 언급한 것 같습니다. 예를 들어 다음 항목을 찾을 수 있습니다:

js.user.change_avatar.title

그리고 사용자 설정 페이지 전체를 정의하고 해당 항목을 포함하는 더 상위 수준의 템플릿도 있을 것으로 예상했습니다. 해당 템플릿에서 아바타 섹션을 제거하면 사용자가 아바타를 변경하는 것을 방지할 수 있습니다. (아니면 제 이름처럼, 이것이 제가 하고 싶은 것입니다.)

하지만 여전히 사용자 설정 페이지를 정의하는 템플릿을 찾을 수 없습니다.

아니요, 제가 말한 것은 @weallwegot 님이 언급한 내용 그대로입니다. Discourse 테마 개발자 가이드를 읽으면 템플릿을 오버라이드하는 방법을 배울 수 있습니다.