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:

  1. Is it possible to make ldap_auth write it's changes back to the table so this works right?
  2. Is the casetracker module gathering the e-mail address of a user in an improper fashion?
  3. Any thoughts or comments would be appreciated.

CommentFileSizeAuthor
#2 ldapauth.module_2.patch1.07 KBkreaper

Comments

icstars’s picture

i 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.

kreaper’s picture

StatusFileSize
new1.07 KB

patch attached. Will be incorporated into HEAD and future releases

kreaper’s picture

Please 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.

kreaper’s picture

Version: 5.x-1.x-dev » master
Assigned: Unassigned » kreaper
Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)