This question about LDAP: Answered
Active Directory 'thumbnailPhoto' attribute does not show as image
I tried to display a
thumbnailPhoto from an Active Directory attribute but it just shows the raw binary data in the attribute in stead of showing the images. I can't find the
task 11642 patch in the Core.pm code. Must have been taken out again before the current version. Here is my query:
%LDAP{
"objectClass=user"
base="OU=users,OU=Sasolburg,DC=karbochem,DC=co,DC=za"
cache="3600"
header="---++ Sasolburg$nSasolburg office has $count users in total.$n$n| *Name* | *Mail* | *Telephone* | *Mobile* | *Employee #* | *Title* | *Department* | *Photo* |$n"
format="| $displayName | $mail | $telephoneNumber | $mobile | $sAMAccountName| $title | $department | <img src=$thumbnailPhoto /> |"
clear="$mobile,$telephoneNumber,$mail,$title,$department,$thumbnailPhoto"
sort="displayName"
}%
Please help! I am almost there. This is an amazing plugin. Thx
--
HeinrichVermeulen - 01 Oct 2013
Please help!!!! Anybody!
--
HeinrichVermeulen - 18 Oct 2013
I'm no expert on the plugin, but this query is working against our AD server and correctly displaying thumbnail images.
%LDAP{"(objectClass=user)"
base="OU=IT,OU=TCA Users,DC=tca,DC=local"
limit="20"
header="| *Nr* | *Name* | *Mail* | *Photo* |$n"
format="| $index | $cn | $mail | <img src=\"$jpegPhoto\" alt=\"$cn\" title=\"$cn\" width=\"100px\" /> |"
footer="$n<br/><font color='red'>$count users</font>"
exclude=".Test"
sort="cn"
clear="$mail,$jpegPhoto"
}%
--
JohnV - 27 Dec 2013
The problem is that jpegPhoto is automatically treated as a blob (binary large object) by the plugin, but thumbnailPhoto isn't. To get this to work for thumbnailPhoto instead of jpegPhoto, you need to specify it as a blob:
%LDAP{
"objectClass=user"
base="OU=users,OU=Sasolburg,DC=karbochem,DC=co,DC=za"
cache="3600"
header="---++ Sasolburg$nSasolburg office has $count users in total.$n$n| *Name* | *Mail* | *Telephone* | *Mobile* | *Employee #* | *Title* | *Department* | *Photo* |$n"
format="| $displayName | $mail | $telephoneNumber | $mobile | $sAMAccountName| $title | $department | <img src='$thumbnailPhoto' /> |"
clear="$mobile,$telephoneNumber,$mail,$title,$department,$thumbnailPhoto"
sort="displayName"
blob="thumbnailPhoto"
}%
This points the image source to a file on the server that contains the binary content from the thumbnailPhoto field in Active Directory.
--
LeilaPearson - 22 Jan 2014