Share your opinion on my unique user registration process, please?
-
I have a separate form for user registration. Once the user submits the form, the submitted responses are posted as a reply to a topic in a private (admin-only accessible) topic. Example post:
Full Name: Name Email: [email protected] Phone Number: +19999999999
When an admin upvotes/reacts (nodebb-plugin-reactions) to the reply in the topic, my custom plugin will listen for this hook and create the user with the provided details. If the admin downvotes, the user does NOT get created.
Is there a better way to handle this scenario?
-
@saikarthikp9 Use the posts queue, and your plugin will inject the custom fields there
-
@josef said in Share your opinion on my unique user registration process, please?:
and your plugin will inject the custom fields there
Can you please explain this? I am a software engineer and was able to successfully test a custom plugin, so you can be technical.
Allow me to add more context. I have some additional fields in the sign-up form that help the admins decide if they should allow the user to join the forum. If there was a good/easy way to add multiple questions to the sign-up form then what you are suggesting makes sense, since admins can approve users from the posts queue considering their sign up responses as well.
-
@julian can you please guide me to some resources on your suggested solutions? I am capable of developing plugins and would like to evaluate your suggestion. Thank you.
Is this what you were referring to, @julian?
https://community.nodebb.org/topic/16994/how-do-i-add-custom-user-fields-to-my-theme -
@julian, please advise on this. I'd rather use something within NodeBB than complicate it by integrating external systems.
Registration form method: Add custom fields using a custom plugin, is that what you mean?
Registration queue method: What do you mean here?Also, what is the best way to update the consent text? Is there a better way than updating the language files?
-
@saikarthikp9 If you override
register.tpl
in your theme (or plugin), then you can introduce additional fields in the registration form — things like phone number, full name, etc.As long as those form fields have
name
, then it is added to the form data, and sent to the backend.You can change queue settings in the ACP (so all registrants are queued).
You probably can't see the additional info in the registration queue template, so you may have to modify that one too.
-
@julian, I am trying to implement your suggestion.
@julian said in Share your opinion on my unique user registration process, please?:
As long as those form fields have name, then it is added to the form data, and sent to the backend.
So, I would still need to implement some backend code to save this to the user object, right? using the setter here: https://community.nodebb.org/topic/16994/how-do-i-add-custom-user-fields-to-my-theme
Because, doing
db.objects.find({username: "test"})
doesn't include the custom fields.@julian said in Share your opinion on my unique user registration process, please?:
You probably can't see the additional info in the registration queue template, so you may have to modify that one too.
The API response for
/api/admin/manage/registration
does not contain the custom fields. Am I doing something wrong, or is this expected? What is the easiest way to add these fields to the API response? Thank you.