Please correct me if i'm wrong, but there does not seem to be a way to import a user's picture from LDAP, at least not if it is in base64. All the code related to this seems to be for LDAP Provisioning - which is apparently not supported anymore.

Thus, i'd like to file a feature request for the ability to import user pictures. If no work is currently being done on this, I'm going to try to write it myself; I mainly want a status update on this before i do so. If it is already supported, PLEASE give some documentation for it as i can't even find it in the source code.

Comments

c3rberus’s picture

I would also be very interested in this feature, using feeds to import photo from AD.

Currently this is a manual process for me, finding user record and adding picture. Though the rest is successively automated, LDAP Feed to pull new/updated employees, and View to present it.

Having a way to pulling the thumbnailPhoto attribute would be great so that everything could be automated.

dolcaer’s picture

Any chance of an update by the maintainers?

c3rberus’s picture

just checking in to see if anyone had any success in this yet? pulling the thumbnailPhoto using feeds into an image field so we don't have to manually maintain user pictures in two different places.

larowlan’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

No update in > 12 months, no patches - closing

Would welcome a patch, if so reopen

tomhung’s picture

I know this is a workaround but here is what I did.

LDAP Query -> added the "thumbnailPhoto" attribute
Text Formating -> add a format with nothing filtered (I called it "AD Photo"), set permissions
Content Type to Import AD users into (I didn't use Profile for reasons) -> Add a long_text field, allow user selected text formatting (I called the field "Profile Pic")
Feeds -> Mapping -> map "thumbnailPhoto" to "Profile Pic" field, select "AD Photo" as text format
Feeds Tamper -> add PHP Code to the Profile Pic field

if($field != ""){
 $encoded = 'data:image/jpeg;base64,' . base64_encode($field);
 return "<img width='200px' src='$encoded' />";
}else{
 return '';
}

My friend pointed out that if I was showing a view of thumbnailPhotos I should save as a file and attach as image field. This will allow apache to multi-thread the display of the pics. My purpose was for single profiles so I wasn't expecting to display hundreds at once.