Hello,
I am new to Discourse administration/development, and do not speak Ruby (yet – though I’m totally willing to learn). My first task was set up a Discourse installation and I’ve done that on on Digital Ocean using the official docker image. So far so good – shout out to the people who made it so easy!
My next task is more challenging (for me). I have volunteered to set up this Discourse for a non-profit organization that wants to restrict user registration and participation to members of that organization. So I need to somehow modify, or hook into, (or replace?) the new user creation process so that we programmatically check whether the submitted email address matches that of a current member of an existing organization, and whether the member’s expiration date is in the future.
The organization uses NeonCRM, and they provide an API that makes this verification reasonably easy. Discourse, as I understand it, provides an API that also lets you do anything you can do manually. So it’s more than theoretically possible to do what I want to do, right? The question is what is the best approach.
If, for example, Discourse lets you write an event listener (or plugin?) that observes the new user signup, does this verification logic, and can abort the registration with an informative message I can somehow display (“Sorry, you need to be a members of The XYZ Association”) – that would be brilliant.
Alternatively, I can imagine writing my own user-registration page (in PHP, a language I know well) that would use both APIs. But then I would need to somehow hack my Discourse installation so that the sign-up page redirects the user to my custom version.
So I would love to hear some suggestions as to what the overall strategy should look like, and where I should look to start learning how to do this.
Many thanks!