Current location: Hot Scripts Forums » Programming Languages » PHP » Ldap Active Directory Phone Book


Ldap Active Directory Phone Book

Reply
  #1 (permalink)  
Old 05-12-09, 09:27 AM
corman420 corman420 is offline
Newbie Coder
 
Join Date: Mar 2007
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Ldap Active Directory Phone Book

I have a simple script which returns results from the active directory. It works great.

But some of the feilds like "streetAddress", "postalCode" etc etc, are not returning any data, even though they are filled out in the active directory.

I starting thinking, that maybe my script is populating data from the Global Catelouge, which in turn only indexes the information which the Global Address Book uses. But when I double click a name in our Global Address Book, I can see all the users details from the active directory.

I guess my question is, how is the Global Address Book populated, and when I click a user, how is the additional information populated?

My assumption is that my script (and the global address book) are using the data from the GC. And when I click on a user in the Global Address Book, the additional data is pulled from the AD.

Does anyone have an example of pulling ALL data of a user from the AD in php using LDAP?

Thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 05-12-09, 10:25 AM
corman420 corman420 is offline
Newbie Coder
 
Join Date: Mar 2007
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
FYI, this is the script I'm using. I am trying to add additional variables. st (state) and l (L for location) are showing fine, but postalCode, streetAddress, postOfficeBox, sAMAccountName are not working - no data is returned.

mpdolan.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 11-22-09, 01:54 PM
wirehopper's Avatar
wirehopper wirehopper is offline
-
 
Join Date: Feb 2006
Posts: 2,516
Thanks: 20
Thanked 109 Times in 106 Posts
I'd look for the code that indicates what information to get from LDAP and check for case-sensitivity.

If you could post the LDAP structure and PHP code, it would help.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 11-30-09, 08:04 AM
scott2500uk's Avatar
scott2500uk scott2500uk is offline
Coding Addict
 
Join Date: Apr 2006
Posts: 275
Thanks: 2
Thanked 2 Times in 2 Posts
When I've worked with AD in the past some elements are stored as an array.

You might be thinking that:

PHP Code:

$adresults['streetAddress'] = "Some Street Address"
When actually its found in

PHP Code:

$adresults['streetAddress'][0] = "Some Street Address"
Just do a:

PHP Code:

echo "<pre>";

print_r($adresults);
echo 
"</pre>"
So you can see the layout of your results.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
authenticate Active Directory Users wajeeh_r ASP 5 04-27-09 12:36 PM
Copy body text into form text box simon@edgehillcu JavaScript 11 03-30-06 05:53 AM
PHP & MS Active Directory djwayne_2004 PHP 0 02-07-05 06:51 PM
Need Epinions-lite system in PHP & MYSQL wali001 Job Offers & Assistance 4 01-12-04 07:02 AM


All times are GMT -5. The time now is 04:49 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.