How to pull fax number using adLDAP

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

maximus81Asked:
Who is Participating?
 
Mike KlineCommented:
0
 
maximus81Author Commented:
Got the same error with facsimileTelephoneNumber.
0
 
Steven CarnahanNetwork ManagerCommented:
The two available locations for a fax number:

facsimiletelephonenumber
otherfacsimiletelephonenumber

Try all lower case.
0
 
maximus81Author Commented:
It was because it wasn't all lowercase. Its working now. Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.