Solved

How to pull fax number using adLDAP

Posted on 2012-04-12
4
375 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

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
This article outlines the process to identify and resolve account lockout in an Active Directory environment.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

772 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