Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to create custom fields programatically while creating new user through API? #20

Closed
mudivili opened this issue Jan 6, 2018 · 1 comment
Labels

Comments

@mudivili
Copy link

mudivili commented Jan 6, 2018

Hey, we create new user automatically using API. We like to add custom fields, while doing so.
With this plugin, I am able to add new custom fields from profile page. How do I do the same while creating user?

Basically, I like to do something like this:

User.create({username: '...', email: '...', fullname: '...', customField: '...'})

and be able to edit that field using nodebb-plugin-ns-custom-fields plugin.

is that possible?

Thank you!

@NicolasSiver
Copy link
Owner

Hello. There is no explicit API to set a custom field. But you can directly put a record in a database, but there is no guarantee that this approach will work with future updates to the plugin if any.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant