Skip to content

Bulk user creation for every account in LDAP #107

@bhotrock

Description

@bhotrock

I didn't see this mentioned in any of the documentation, but was wondering if there is a function to automatically create WordPress accounts for every user in LDAP. I understand that the normal behavior is to create the WordPress account (and update it) whenever a user logs in.

However, I would like to be able to force account creation (or account updating) in a single process. This process could be either a button to force the "sync", or could be setup as a cron job.

My use case for this is that I want to use a WordPress "newsletter" plugin for sending email notifications to various LDAP user groups. The plugin allows sending to WordPress members according to "Role". And authLdap allows to map LDAP Group Membership to WordPress Roles. So I think this would allow me to automatically turn LDAP Groups into separate email subscriber lists.

However, I need to make sure that the WordPress user accounts are complete and up to date before sending the email. In my case, I'm looking at about 1000-2000 user accounts, with users belonging to 1-6 groups each. I can't expect that every user will have logged into WordPress, but I need their account to exist in WordPress whether they have logged in or not.

It would not be necessary to cache the password during this process since I don't need the password data. But I would need to "sync" things like uid, group membership, and a display name.

Does this ability already exist in authLdap? Or would it be possible to add it?
Thank you for the information and consideration!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions