I have the profile module enabled and I noticed that when the profile fields were being updated the e-mail address was being deleted from the account. The fix would be to change line 95 to:

case 'update':
      if (strpos($mail, 'sharedemail_') == 0 && $category == 'account') {
        $edit['mail'] = str_replace('sharedemail_', '', $mail);
      }
      break;

Notice the additional check for the 'account' category.

Comments

muhleder’s picture

I think it might cover more potential cases if you used

case 'update':
      if (strpos($mail, 'sharedemail_') == 0 && isset($edit['mail'])) {
        $edit['mail'] = str_replace('sharedemail_', '', $mail);
      }
      break;

Looks like the real problem is that edit['mail'] is being set to '' when it hasn't been loaded in to the $edit variable.

sittard’s picture

That seems to work - thanks

muhleder’s picture

Status: Active » Reviewed & tested by the community

Let us know if you have any problems with it, I guess that would make this RTBC?

aufumy’s picture

Awesome, muhleder, do you have a cvs account with drupal.org? If not, would you be interested in applying for it, and becoming a co-maintainer of this project?

muhleder’s picture

Hi, could do yes. I don't have a CVS account so I'll make an application to get one.

Mark

decomposer’s picture

In my view this is a critical bug. Erasing email addresses whenever a profile is edited is a major pain for the user. And if an admin is making a role addition to the user, how's he/she to know what the user's email address is since it doesn't appear on the form? This should be posted on the download page for this module since most folks do not read bug reports.

aufumy’s picture

Assigned: Unassigned » aufumy
Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.