https://github.com/nodebb/nodebb-plugin-import-users-csv
A plugin that allows for importing users into a NodeBB instance via CSV file
https://github.com/nodebb/nodebb-plugin-import-users-csv
Last synced: 8 months ago
JSON representation
A plugin that allows for importing users into a NodeBB instance via CSV file
- Host: GitHub
- URL: https://github.com/nodebb/nodebb-plugin-import-users-csv
- Owner: NodeBB
- License: mit
- Created: 2023-06-28T19:06:07.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-05T23:53:13.000Z (over 1 year ago)
- Last Synced: 2024-04-14T11:52:03.058Z (over 1 year ago)
- Language: JavaScript
- Size: 467 KB
- Stars: 0
- Watchers: 4
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Import Users via CSV
This plugin exposes a new admin page and endpoint for automatically creating users in the NodeBB instance via CSV upload.
Required fields are one of `username` or `firstname` (`lastname` is automatically appended if present), and `email`.
Additional fields can be present in the CSV file, but are ignored, unless explicitly specified via the admin panel.
If an additional field is specified, then it will be saved into the user's hash.
## Installation
There is an identically named package not under the `@nodebb` scope, be sure to install the properly scoped plugin instead:
npm install @nodebb/nodebb-plugin-import-users-csv
## Screenshots


## Plugin Hooks
This plugin fires off a single hook when user import has completed. To use it, listen for the `action:importUsersCSV.created` hook, e.g.
``` js
const plugins = require.main.require('./src/plugins');
plugins.hooks.register('myPlugin', {
hook: 'action:importUsersCSV.created',
method: ({ uids, users }) => { ... },
});
```