We used to get this error when editing an LDAP user (e.g. adding a picture to their profile). I added this to ldapauth.module at line 178:

        switch (LDAPAUTH_ALTER_EMAIL_FIELD) {
          case LDAPAUTH_EMAIL_FIELD_REMOVE :
            $form['account']['mail']['#type'] = 'hidden';
            $form['account']['mail']['#required'] = FALSE; //Added
            $form['account']['mail']['#attributes']['READONLY'] = 'READONLY';
            break;
          case LDAPAUTH_EMAIL_FIELD_DISABLE :
            $form['account']['mail']['#required'] = FALSE; //Added
            $form['account']['mail']['#attributes']['READONLY'] = 'READONLY';
            break;
        }

Sorry I can't be bothered to make a patch, but it works.

Comments

rmiddle’s picture

I am getting the same error myself. Yea someone took the time to fix it.

Thanks
Robert

miglius’s picture

Assigned: Unassigned » miglius
Issue tags: +ldapauth
miglius’s picture

It looks like your user is missing a drupal mail field, which should not be happening. I think that this is related to #380348: Value of E-mail field gets deleted from DB.

miglius’s picture

Status: Active » Postponed (maintainer needs more info)

Can you apply patch attached to a #380348: Value of E-mail field gets deleted from DB to see if it solves the issue?

miglius’s picture

Status: Postponed (maintainer needs more info) » Fixed

Closing as I assume that patch #380348: Value of E-mail field gets deleted from DB has fixed it. Please reopen if that is not the case.

Status: Fixed » Closed (fixed)
Issue tags: -ldapauth

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