I'm using php to display users from the LDAP and i'm trying to output their usernames, so i am using this piece of code:
for ($i=0; $i < $entries["count"]; $i++)
echo $entries[$i]["sAMAccountName"]."<br />";
Although this produces the following error for each user:
Notice: Undefined index: sAMAccountName in C:\xampp\htdocs\test4.php on line 45
Using 'displayname' works. Anyone know what is causing this?