for the case your plugin gets activated after user-creations you'd have to use the hook action:plugin.activate (take care to compare the id you'll get with your plugins id since this fires for each plugin).
The following is the way I'd go within, maybe there is a more simple (or better performance) way:
Get somehow all user-ids (personally I don't know how, maybe this would help) and use the function setUserField of the user-module to set each users field-value.
How can I login by using LDAP?
KebenSun last edited by
I want to login to nodebb by using LDAP, which plugin should I use?
I have tried nodebb-plugin-office-ldap and nodebb-plugin-sso-ldap, and I can't solve my problem very well.
I think LDAP integrations can be quite difficult to achieve for web apps -- not impossible, but different for every implementation. I think you might need some custom work, reach out to us at firstname.lastname@example.org if you're interested. Thanks.
@KebenSun I modified nodebb-plugin-office-ldap to work with our OpenLDAP server. The code is still a bit rough around the edges....but it works well so far and it's quite configurable. Might be worth a shot for you. Here's the github page:
I finally got around to publishing nodebb-plugin-node-ldap on npm so it should be available in the plugins menu now in the ACP