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

我搜索了 20 分钟,却找不到偏好设置模板。我找到了一些片段,但不是完整的模板。有人能告诉我它在哪里吗?

我认为模板指的是代码库的 这一部分

这部分指定了当有人点击用于编辑头像的大铅笔图标时执行的操作。

此外,这里是与 showAvatarSelector 关联的 操作,如果您希望自定义,可以替换它。

希望这能帮到您!

谢谢,但我认为 @Falco 可能指的是 管理 > 自定义 > 文本。例如,我可以找到这段内容:

js.user.change_avatar.title

我原本以为会有一个更高层级的模板来定义整个用户偏好设置页面,并包含该部分内容。通过从该模板中移除头像部分,就可以阻止用户更改头像。(或者更改他们的全名,这正是我想做的。)

但我仍然找不到定义用户偏好设置页面的那个模板。

不,我的意思正是 @weallwegot 所提到的。你可以通过阅读《Discourse 主题开发者指南》来了解如何覆盖模板:Developer’s guide to Discourse Themes