5

I would like to use Zend Framework 2 with Doctrine 2 and openLDAP. My goal is to create a persistence for my LDAP. How can I accomplish this in ZF2?

I noticed that we can get objects from LDAP with Zend\Ldap\Node.

Can anyone show me an example of how to make a search from a LDAP and convert the results into nodes and/or maybe into a Collection of Nodes?

I'd like to have objects to work on after the search.

Thanks

Diemuzi
  • 3,507
  • 7
  • 36
  • 61
Kiruchi
  • 195
  • 3
  • 13
  • 4
    Take a look to the component unit test. Sometimes are a live example about how to use the code. – Maks3w Feb 25 '13 at 08:16

1 Answers1

1

Well, this may come "a little" late, but just to give others pointers on how to do this. I have created a Module called SamLdapUser which runs its authentication against Ldap / AD. A sample configuration is provided.

The persistence layer (user-object in application) is created through a second Module. This Module hooks in to the getIdentity() function of the authentication Service and then queries the database for the user-object. If no object is existing, a new object will be created. You can check the source code for my module SamLdapUserObject, too.

Sam
  • 16,435
  • 6
  • 55
  • 89