I've been looking into the ldapdata.module file (ldapdata_user_profile_load function) and I spot code that seems to want to integrate with the user profile module.
But - I can't find any info on howto - and I can't seem to figure it out.
So - for example - I'd like to get the ldap CN into a profile field called Full Name. Reason for this is so that the gallery integration can then use the CN as the users full name since the gallery module links to the profile module for this.
How do I configure this?
I've tried matching the profile column name and the ldapdata name (called the field column "cn" in the profile) - but - the profile field is not getting populated.
Oh - one other question - will fields that are thus synced show up in the user under both LDAP data and the profile data ?
Comments
Comment #1
rblomme@drupal.org commentedI change line 325 of the ldapdata.module
db_query("UPDATE {profile_values} SET value = '%d' WHERE fid = '%d' AND uid = '%d'", $value, $fid, $uid);into
db_query("UPDATE {profile_values} SET value = '%s' WHERE fid = '%d' AND uid = '%d'", $value, $fid, $uid);(replace %d with %s) and it works.
// $Id: ldapdata.module,v 1.1.4.5 2006/08/20 10:35:14 pablobm Exp $
Comment #2
chrissearle commentedHmm
I'll give it a go - but - just to mention it:
I have
// $Id: ldapdata.module,v 1.1.4.4 2006/08/05 13:05:13 pablobm Exp $
Line's around 325
Anyhow - I switched out line 325 with your new one - still not working.
Take for example - I have an LDAP record with the field telephoneNumber in it.
I'd like this in the profile field called "Telephone".
Exactly which part of the profile field needs to match telephoneNumber? Is it the database column name or the name or ?
Comment #3
Nemo34 commentedI noticed a annoying bug in profile LDAP mapping.
If the name pf the profile field is to long, you get this message when saving the ldapdata parameter
for the second time:
user warning: Duplicate entry 'ldap_drupal_reverse_mappings-profile_publication' for key 1 query: INSERT INTO variable (name, value) VALUES ('ldap_drupal_reverse_mappings-profile_publications_majeures', 's:0:\"\";') in /www/drupal/includes/database.mysql.inc on line 120.I solved my problem by giving shorter names to my profile fields mbut recommend our geniuses to
update the corresponding code some day
Comment #4
Anonymous (not verified) commentedI'm bumping this up to critical... rblomme's change fixes this, and without it every single profile match will be set to 0, which is a pretty big problem...
Comment #5
pablobm commentedHi guys. Just wanted to mention that the bug mentioned in comment #1 is solved now (already commited). The rest of this will follow shortly.
Comment #6
pablobm commentedOk, this should be fixed now. I changed the was mappings are stored, but I also retained back compatibility, so there should be no problems updating.
I commited the fix to CVS.
Comment #7
cpfarhood commentedI have a current version of the ldapdata.module file but it's still not mapping correctly to the drupal profile fields, it also doesn't show what the current mapping is in the text boxes corresponding to the drupal fields when you bring up the ldapdata settings page.
Comment #8
pablobm commentedUgh... try now, please
Comment #9
Libra commentedI have installed last version (from 05.11) - all works is fine. Thanks for your work! But there is one moment - when the user updates the profile and leaves empty fields optinal to filling we receive an error: warning: ldap_mod_del () []: Modify: Invalid syntax in ldap_integration\ldap_integration\LDAPInterface.php on line 170
Comment #10
kreaper commentedIs this still a problem ?
Comment #11
chrissearle commentedRunning:
// $Id: ldapdata.module,v 1.1.4.9 2006/11/04 18:53:03 pablobm Exp $
All seems to work for me :)
Comment #12
kreaper commented