Solved

How to pull fax number using adLDAP

Posted on 2012-04-12
4
370 Views
Last Modified: 2012-04-12
I have the code below and for some reason I am unable to pull the fax number. I keep getting Undefined index: fax. i know this is working because I tried sn and it gives me the last name of the user.

$username = $row['login'];
$userinfo = $adldap->user()->info($username, array("*"));
$efax = $userinfo[0]["fax"][0]; 
$telephone = $userinfo[0]["telephone"][0]; 
echo $efax;
echo $telephone;

Open in new window

0
Comment
Question by:maximus81
  • 2
4 Comments
 
LVL 57

Accepted Solution

by:
Mike Kline earned 125 total points
ID: 37839874
0
 

Author Comment

by:maximus81
ID: 37839895
Got the same error with facsimileTelephoneNumber.
0
 
LVL 26

Assisted Solution

by:pony10us
pony10us earned 125 total points
ID: 37839917
The two available locations for a fax number:

facsimiletelephonenumber
otherfacsimiletelephonenumber

Try all lower case.
0
 

Author Comment

by:maximus81
ID: 37839920
It was because it wasn't all lowercase. Its working now. Thanks
0

Join & Write a Comment

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now