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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With