Hi,

It seems like LDAP authenticated users cannot use the BlogApi. On my server i can correctly blog as Admin but not with one of the LDAP authenticated users. It just gives a invalid user/password error (maybe caused by the random password written into the database).

Thr routine that logs in (blogapi_validate_user()) calls user_athenticated with the plaintext username/password from the xmlrpc request.

Any idea how to solve this?

Comments

miglius’s picture

In order to authenticate against ldap instead of a drupal database, a ldapauth_authenticate() function should be called instead of user_authenticate().

miglius’s picture

Component: Code » Documentation
Category: bug » support
kacy’s picture

I did this little modification in the blogapi.module file, replacing line

  $user = ldapauth_authenticate(array('name' => $username, 'pass' => $password));

by

  if (function_exists('ldapauth_authenticate')) {
    $user = ldapauth_authenticate(array('name' => $username, 'pass' => $password));
  } else {
    $user = user_authenticate(array('name' => $username, 'pass' => $password));
  }

which seems to be working...
I'm running drupal-6.11 and ldap_integration version = "6.x-1.x-dev" / datestamp = "1241828033"

jzornig’s picture

This patch worked for me: Drupal 6.14 & LDAP integration 6.x-1.0-beta2

Pity the change has to be made to the blogapi.module and is not something that can be integrated into LDAP Integration module.

john franklin’s picture

With Drupal 6.15 and LDAP Auth 6.x-1.0-beta2 I also had force the permission cache to be rebuilt.

Change:

    if (user_access('administer content with blog api', $user)) {

To:

    if (user_access('administer content with blog api', $user, TRUE)) {
cgmonroe’s picture

Status: Active » Closed (fixed)

Clearing out old support requests - reopen if problem still exists in newest code