Okay, so I'm using LDAP integration with the case-tracker module and I've run into a weird problem:
We are currently migrating from one e-mail domain to another. The first time a user logs in, it saves the e-mail address to the user table when that user gets created in _ldapauth_save_user(). So, we change people's info in AD and when I go to view the user profile, sure enough it displays correctly.
However, going into the database, I can still see that the users table has the incorrect value in it. This poses a problem because the casetracker module is trying to send updates and it queries from the database directly... so when it tries to send e-mails out, it pulls either the wrong address (or in some cases) nothing at all.
To make matters worse, since I'm loading these values from within the user_load hook, I can't just call user_save because user_load calls user_save when it's done to refresh itself, and it ends up calling itself recursively.
This leaves me with two question:
- Is it possible to make ldap_auth write it's changes back to the table so this works right?
- Is the casetracker module gathering the e-mail address of a user in an improper fashion?
Any thoughts or comments would be appreciated.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | ldapauth.module_2.patch | 1.07 KB | kreaper |
Comments
Comment #1
icstars commentedi am not using casetracker, but have a similar need regarding emails needing to be updated across multiple drupal sites that connect to active directory. i too see the new email address from AD when the user logs in - it displays properly on their account profile, but it does not get updated in the user table. So, this I believe this answers your question 2 - ruling out casetracker as the cause.
Comment #2
kreaper commentedpatch attached. Will be incorporated into HEAD and future releases
Comment #3
kreaper commentedPlease do NOT use the patch. The patch uses new global variables that were incorporated into HEAD that are not available in your module yet. Instead, simply download HEAD. I will be releasing a new release soon that you can upgrade to.
Comment #4
kreaper commentedComment #5
(not verified) commented