Skip to:

LDAP Plugin

  • Hello, since everyone’s been so helpful here, I thought I would give a little back. This seemed like the place to post this. I spent the last few days working with my system administrator to get the ldap plugin to work with our AD. We had done this successfully with WordPress and we were going to integrate bbpress with WordPress, but that layer of complication with ldap on WPMU made it too complex.

    So we decided to leave bbpress on its own and use the ldap plugin posted here. Only we couldn’t get it to work at first. When we finally got it working, the local logins, specifically the Key Master account, could no longer log in. So here’s what we changed to make it work:

    (1) in function connectUser, where $uid is set (line 327), change the first chunk of the string from ‘uid=’ to ‘cn=’ (this change may be specific to Windows/AD LDAP).

    (2) in same function, comment out line 344 (ldap_unbind) because it is both redundant with line 345 and is using the wrong parameter (wants a connection object but $result is just a boolean value).

    (3) in function newUser, add the user_nicename field to the database insertion and set it to the variable $user_login. This is a unique key in the database, and if it’s not set, all user additions after the first one will fail because of a duplicate (blank) key field.

    We still don’t have local logins working, but that’s okay for us because we don’t want them. It might be something we’ll want to use in the future. I hope this helps anyone who might want to use this.

You must be logged in to reply to this topic.