I’m setting up a Discourse install that will is a forum for credentialed professionals. Each user will be verified, and can choose a username to their liking, but we’d like the full name in their profiles to match their credentials. Is there a way to require moderator approval for making changes to the full name field?
סיכום מבוסס בינה מלאכותית
The discussion revolves around requiring moderator approval for changes to the full name field in a Discourse install. paulrudy initially inquired about this feature, but ondrej stated that it is not currently possible.
As an alternative, paulrudy discovered that custom fields can be restricted from modification under Settings > Customize > User Fields.
paulrudy also asked about setting up a logging or notification system to alert staff when a user modifies their name. simon suggested using a User Event webhook to send notifications to a service outside of Discourse, such as Zapier.
Although paulrudy initially found this approach too complex, they later took it as a challenge and successfully set up a webhook receiver and data store on integromat. This setup allows staff to be notified when a user changes their full name, with a post added to a staff-only topic in the format “Foo Bar (username: foobar) has changed their full name to Boo Far.”
Hello,
This isnt possible right now.
Thank you. Is it possible to introduce a custom field in user profiles that would be able to be restricted from modification?
Edit: Never mind, I see that this is possible under Settings > Customize > User Fields
Is it possible to set up a logging or notification system to staff when a user modifies their name?
You could configure a User Event webhook to point to a service outside of Discourse that sends you a notification when a user makes any changes from on their profile page. A service like Zapier could be useful for handling the webhook: Trigger a Zapier task with Discourse Webhooks.
WIth the webhook approach, it would take some work to be able to determine that the user’s name property was what had been changed - you’d need to compare the webhook’s payload against user data that you’ve saved to an external database. If, instead, all you needed to know was that the user’s profile was updated, processing the webhook would be straightforward to process.
Thanks very much for this suggestion. Managing an external database and programming a tool to make comparisons of that with a webhook payload is beyond level of skill at this point! But I hope your suggestion is useful for anyone else who wants to accomplish something similar, and who has the proper skills.
@simon, well I couldn’t resist, and I took your suggestion as a challenge to learn something new.
I set up a webhook receiver and data store on integromat. The data store contains pertinent user info as delivered by webhook (I didn’t have to import existing users, because this Discourse is not live yet).
Webhook header is checked for user_destroyed, user_created, and user_updated. Destroyed and created users are deleted and created accordingly in the data store.
For updated users, their name is looked up in the data store, then their record is updated, and if the previous name differs from the updated name, integromat adds a post to a staff-only topic in the form of
“Foo Bar (username: foobar) has changed their full name to Boo Far”
Thanks for your suggestion!
