[eluser]mraliks[/eluser]
I know this is an old post, but your last bit of code should look more of something like this:
Code:
$user = $this->adldap->user()->info($username, array("*")); //works with the latest version of adldap
We set the user info into an array called $user. Therefore to call up any user data, we either do:
or individually, fetch an array item from the user array, for example:
Code:
echo $user[0]['userprincipalname'][0]; //echoes username
echo $user[0]['givenname'][0]; first name
echo $user[0]['sn'][0]; // last name
echo $user[0]['mail'][0]; //email address
echo $user[0]['physicaldeliveryofficename'][0]; //Office location
The full list of active directory attributes that makes up the $user array can be found on the adLDAP website.