search

LEMON BLOG

Implement LDAP facility in OrangeHRM

This article is about enabling LDAP authentication procedure in OrangeHRM so it has been considered from my side that you must have the knowledge about Orange HRM system. If you are not aware of OHRM, then please go to www.orangehrm.com.

I have implemented this facility using adLDAP which is nothing but a PHP class that provides LDAP authentication and integration with Active Directory. Another thing that I have installed OrangeHRM on win XP.

Please follow below steps to achieve LDAP implementation.

Download adLDAP from adLDAP Download
Extract the zip containing adLDAP PHP class and place the adLDAP.php to OrangeHRM root directory as web_content(PHP root)/OrangeHRM/lib/common/ldap/adLDAP.php (create ldap directory as it is not present there)
Now before start coding, please read the documentation of adLDAP at adLDAP Documentation because adLDAP class needs some information related to your ADS server to get connected
Find login.php of OrangeHRM in which modification will be done
Comment the existing code to handle LDAP module
​Below that write following piece of code:

require_once(dirname(__FILE__) . '/lib/common/ldap/adLDAP.php');
$adldap = new adLDAP();
$ldapFile = ROOT_PATH . "/lib/common/ldap/adLDAP.php";
$_SESSION['ldap'] = "enabled";
$_SESSION['ldapStatus'] = "enabled";


​Now call the adLDAP class's method authenticate() using adLDAP object in place of ldapAuth() as shown at the place of authentication code.

$ldapAuth = $adldap->authenticate($rset[0][0], $_POST['txtPassword']);

​Create the users in OrangeHRM same as ADS server with blank passwords
Now start login with ADS authentication credentials

Please follow How to enable LDAP to get information about OrangeHRM LDAP module work. 

Hey as above has done with OrangeHRM using adLDAP, both are opensource projects developed using PHP. In my case it has been worked successfully. As I have also searched for this issue drastically but didn't got any solution so after achieved the solution me presenting this piece of work to you. Please let me know your reviews and comments if any...


Source: SAMAJDAR Article on LDAP Integration for OrangeHRM

Tips to improve as a graphic designer
Fake Facebook Website Themes/Templates
 

QUICK ACCESS

 Lemon Blog Articles

Lemon Web-Games

Lemon Web-Apps

 Lemon Web-TV

 Lemon Cloud System