1

I want to import user accounts to my Drupal site via the LDAP server. How do I do that? I installed LDAP feeds, but I don't understand how it works. I have LDAP query installed and working.

  • What's your exact problem? What exactly don't you understand? Please expand your question. – leymannx May 29 '17 at 16:25
  • how can i use ldap queries and convert the query result to drupal user entities? Apparently, you do it with drupal ldap feeds, but i don't understand how. – José Trindade May 29 '17 at 16:36
  • A month ago LDAP Feeds still was not ported to D8. Is it now? What's the README in the LDAP module saying? – leymannx May 29 '17 at 16:40
  • 1
    i looked up the .module file: it's empty. and all code is inside an "unported" folder. – José Trindade May 29 '17 at 16:49
1

As the comment noted this question would benefit from much more detail.

There are 2 very broad scenarios here;

  1. Loading LDAP user attributes for use and reference within Drupal (probably user entities) users that exist.
  2. Linking LDAP users to Drupal in an ongoing fashion including some form of authentication requirement.

In the first case you won't likely be dealing with LDAP user credentials (which is good) and greatly simplifies the implementation. This is a good example; on Drupal.org using LDAP feeds.

In the second case LDAP feeds is probably not the best or only module you'll need. This d.o article covers some ground but there are important gaps, but also some good linked resources in that section that could be of great help to you depending on your needs.

There are a plethora of variants on these cases. One time vs ongoing, update bi-directional or with one resource overwriting the other as authoritative, updating non-user entities and keeping them in reference to users, and many more. This split is designed to identify the most likely cases from the question you asked.

If this is one-time, an option (not ideal) may be to bring the users into an interim D7 instance and then migrate them to D8. This could be done repeatedly but would require a standing D7 instance to maintain. I'd only suggest this until the D8 LDAP feeds project is further along. It could give you time to dig in and contribute as well. ;)

Giving this further thought and since the module isn't fully ported, this could be done with a server cron, a little scripting and a docker D7 instance. A nightly docker spin up, pull from LDAP into D7 and migrate users to D8. It's far from a good solution. But it sounds like your need is immediate and this would work. If time isn't a factor either porting the module yourself or paying someone to do it is the best path.

I'm happy to amend or expand this answer as needed based on additional information added in your question.

  • i want to use the result of an ldap to query to programatically create user entities on drupal. i'm using Drupal 8. i noticed ldap feeds is still unported, as you're supposed to use it to do it. – José Trindade May 29 '17 at 16:54
  • Is this an ongoing sync or a 1 time sync? Figuring here that credentials are a non-factor.. not synced. This is 1 way as well, from LDAP to Drupal right? – Adam John May 29 '17 at 16:58
  • ongoing. preferably done with a cron job.yes, only one-way, from ldap to drupal. – José Trindade May 29 '17 at 17:01
  • The module isn't fully ported as yet. If you're able to contribute - that's ideal. However it's likely an interim approach might be needed it seems. – Adam John May 29 '17 at 17:08
  • unfortunately, i can't. – José Trindade May 29 '17 at 17:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.