in file ldap_integration/ldapdata.module
at function _ldapdata_ldap_init

there is the following line:
if ($row = db_fetch_object(db_query("SELECT * FROM {ldapauth} WHERE status = '%s' AND name = '%s'", 1, $user->ldap_config))) {

which uses the user data variable $user->ldap_config
checking in the mysql->users->MyUser->data , I couldn't find "ldap_config" variable...

so...
in file ldap_integration/ldapauth.module
at function _ldapauth_ldap_login

we can find a user_save call

      $user = user_save(
        '',
        array(
          'name' => $login_string,
          'pass' => $pass,
          'mail' => $mail,
          'init' => $init,
          'status' => 1,
          'authname_ldapauth' => $login_string,
          'roles' => array(DRUPAL_AUTHENTICATED_RID),
          'ldap_authentified' => TRUE,
          'ldap_dn' => $dn
          )
        );

in which is missing the appropriate variable...

to fix it, just add this line 'ldap_config' => $ldap->name,

      $user = user_save(
        '',
        array(
          'name' => $login_string,
          'pass' => $pass,
          'mail' => $mail,
          'init' => $init,
          'status' => 1,
          'authname_ldapauth' => $login_string,
          'roles' => array(DRUPAL_AUTHENTICATED_RID),
          'ldap_config' => $ldap->name,
          'ldap_authentified' => TRUE,
          'ldap_dn' => $dn
          )
        );

Comments

Anonymous’s picture

Status: Fixed » Closed (fixed)

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