Closed (fixed)
Project:
Lightweight Directory Access Protocol
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 Mar 2013 at 16:25 UTC
Updated:
2 Jul 2017 at 14:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
matthewgann commentedWould like to be able to do this as well separate from the user system (not all people in AD will be a user in Drupal).
Comment #2
matthewgann commentedGot it working. Just FYI from a lot of different posts.
In the latest dev, goto modules/ldap/ldap_views/plugins/ldap_views_plugin_query_ldap.inc, around line 258, after the first if, add
In your view, add the thumbnailphoto attribute. Rewrite the results to:
<img src='[attribute_10]' alt='photo' />It works for me.
Comment #3
c3rberus commentedHi,
We are also looking for a way to pull AD photos from the thumbnailPhoto from AD into Drupal for users. Currently this is a manual process for us.
We use "feeds" to import AD users into Drupal for a "Employee List" view page.
What you are saying is.. I can add a "image" field type into my content type and using feeds I can map the thumbnailPhoto attribute to the "image" field type, run the feeds import and we should be able to "import" AD photos?
Thanks.
Comment #4
matthewgann commentedIf you're just doing an employee list, I'd use LDAP query and create a view instead of using feeds.
Comment #5
c3rberus commentedWe are using feeds to import new employees from AD, then we are using views to present the feed. We need both, so that our employee list found on the Intranet is current.
LDAP Feed is configured to run nightly, updating existing users (department, office, name changes) and adding new users.
Comment #6
dolcaer commentedI've also filed a new feature request for importing images through feeds, as this is exactly what i need. I've tried to use an LDAP query view at first too, but this will likely be too heavy for our server to handle when users are actively using it.
Comment #7
larowlanno update for > 12 months - closing
Comment #8
tomhung commentedI would love to get #2 committed to the Dev or PRD version of this module.
Comment #9
rooby commentedHere is a patch based on the code in #2 for latest dev.
Works for my testing.
Comment #10
grahlIt's not a great solution but should work for the majority of cases, so I'm fine committing this.
Could you please make the quotes and escapes valid and consistent for jpegphoto as well as thumbnailphoto? Also, should there really be a space in the data url before base64 encoding?
Comment #11
rooby commentedHmm, that's probably a no on the extra space.
I'm working on this site currently so I'll update the patch either today or tomorrow.
Comment #12
grahlHi
Sorry for nagging, any chance we could get the updated patch?
Comment #13
rooby commentedOops sorry.
Comment #15
grahlThanks! Patch committed.
This is not relevant for 8.x since Views relies on a separate field class, which the user can choose to embed base64 encoded images and thus we do not need to hardcode this any longer: http://cgit.drupalcode.org/ldap/tree/ldap_query/src/Plugin/views/field/L...