Hi,
I have the module working fine, and all the fields I want are displayed fine on the users respective profile pages. However, I have the need to use some of these values (such as cn, manager) in other areas of the site. I tried doing this;
$ldapdata_attributes = ldapdata_attributes();
print_r($ldapdata_attributes);
However, the printed array gives me nothing:
Array ( [givenName] => Array ( [0] => text [1] => textfield [2] => First Name [3] => 64 [4] => 64 ) [sn] => Array ( [0] => text [1] => textfield [2] => Last Name [3] => 64 [4] => 64 ) [cn] => Array ( [0] => text [1] => textfield [2] => Common Name [3] => 64 [4] => 64 ) [manager] => Array ( [0] => text [1] => textfield [2] => Manager [3] => 64 [4] => 64 ) [directreports] => Array ( [0] => text [1] => textfield [2] => Direct Reports [3] => 64 [4] => 64 ) [co] => Array ( [0] => text [1] => textfield [2] => Country [3] => 64 [4] => 64 ) [mail] => Array ( [0] => text [1] => textfield [2] => Email [3] => 64 [4] => 64 ) )
Does anyone know of a way to pull this information?
Thanks a lot for this module, and for any help!
Comments
Comment #1
tdobbs commentedAnyone have any ideas for this? I cant seem to find a way to pull this info.
Comment #2
tdobbs commentedFor what its worth, the only way I could do this is add the values to the users profile using User Profiles and ldap_data. Then I had to get the data using
global $user;
profile_load_profile($user);
If anyone knows a way to grab these values without adding them to the profile let me know!
Comment #3
eikes commentedHere is what I came up with:
It's just some code pulled from the ldap module. If it helps anyone...
Comment #4
cgmonroe commentedClearing out old support requests - reopen if problem still exists in newest code