This php is available on the server configuration, but was never called in the user_lookup function in the ldap server. This is fixed and will be in head shorltly and needs review.


function user_lookup($drupal_user_name) {
   $watchdog_tokens = array('%drupal_user_name' => $drupal_user_name);

 if ($this->ldapToDrupalUserPhp && module_exists('php')) {
      global $name;
      $name = $drupal_user_name;
      $code = "<?php global \$name; \n". $this->ldapToDrupalUserPhp . "; \n ?>";
      $watchdog_tokens['%code'] = $this->ldapToDrupalUserPhp;
      $code_result = php_eval($code);
      $watchdog_tokens['%code_result'] = $code_result;
      $ldap_username = $code_result;
      $watchdog_tokens['%ldap_username'] = $ldap_username;
      $name = NULL;
      if ($this->detailedWatchdogLog) {
        watchdog('ldap_server', '%drupal_user_name tansformed to %ldap_username by applying code <code>%code

', $watchdog_tokens, WATCHDOG_DEBUG);
}
}
else {
$ldap_username = $drupal_user_name;
}

Comments

johnbarclay’s picture

Status: Active » Needs review

I added a simpletest for this. Its the last test is ldap_autorization/tests/Derivations.test

johnbarclay’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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