LDAP authentication mechanism for Question2Answer.
Pull request Compare This branch is 63 commits ahead of robkub:master.
Latest commit 1b7c09c Feb 5, 2016 @zakkak Merge pull request #20 from DoubleAG008/nav_list_fix
Added level parameter to parent nav_list method call.


LDAP login


qa-ldap-login is an LDAP authentication mechanism for Question2Answer. In it's current form, it is intended to replace/augment the existing Q2A login form. The script will first check user credentials against LDAP and can fall back to the internal authentication if that fails. If a user exists in LDAP but not Q2A, the script will create a new user account for the individual.


In order for PHP's built-in LDAP functionality to work correctly, your web server must be properly configured. In CentOS, this means openldap must be installed, and any certificates necessary to authenticate with LDAP specified in the openldap configuration.


To install the plugin:

  1. Add the qa-ldap-login directory with plugin files to the qa-plugin directory for your Q2A install.

  2. Insert the following line of code above the if statement at line 61 of qa-include/pages/login.php

    require_once QA_INCLUDE_DIR.'../qa-plugin/qa-ldap-login/qa-ldap-process.php';

  3. Change the options for the plugin in the administrator interface.

  4. If your LDAP settings are configured correctly, that should be it!


In case it doesn't work try commenting out error_reporting(E_ALL^E_WARNING); in GenericLDAPServer.php and/or ActiveDirectoryLDAPServer.php. This will enable printing warnings from