Community Documentation

LDAP Query

Last updated October 7, 2011. Created by johnbarclay on October 7, 2011.
Log in to edit this page.

LDAP Query 7.x-2.x Summary

Overview

LDAP Query is simply a place to store LDAP Queries. These queries are used by other modules such as LDAP Views or LDAP Feeds. Attached is a configuration screenshot.

AttachmentSize
ldap_query_conf.png81.38 KB

Comments

More details

I was wondering if you could provide details of how to build more complex, dynamic queries? We have been tasked (Computer Science Capstone Class) with integrating a drupal project with a corporate AD. One of the requirements is that when viewing a users profile, you can see the hierarchy [above or below] them. So a user has a "directReports" attribute, and a "manager" attribute. Can LDAP query be used to dynamically pass parameters as to the user we are querying, or the attribute, etc..?

Since I will MOST LIKELY be working a lot with this module either by digging through code, or with some help from the author, I would be willing to write up any documentation. If I could just get some pointers in the right direction.

Thanks,
Josh

I don't know if this is

I don't know if this is exactly what you are asking....

1. But you could use the LDAP Profile module (a component of this grouping of modules)
2. Edit Profile Fields (admin/config/people/accounts/fields)
3. Add 'Manager' and 'Direct Reports'
4. Go to LDAP profile config (admin/config/people/ldap/profile)
5. Add the attribute name into the fields you've newly created at the bottom.
(for manager, I just put 'manager' (the AD attribute) in the text field, I did not check 'derive from DN search' and I left 'LDAP field to derive from' blank)

Now when you look at your user profile you should see
'User'
'Direct Reports'
......
'Manager'
......

Might be simplistic but this is the best I've come up with so far.

Page status

No known problems

Log in to edit this page

About this page

Drupal version
Drupal 7.x
Audience
Site administrators
Drupal’s online documentation is © 2000-2013 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License. Comments on documentation pages are used to improve content and then deleted.
nobody click here