PHP Classes

Codeigniter LDAP: Manipulate LDAP accounts setup with CodeIgniter

Recommend this page to a friend!

  Author Author  
Picture of ask sa sa
Name: ask sa sa <contact>
Classes: 3 packages by
Country: Morocco Morocco
Innovation award
Innovation award
Nominee: 1x


  Detailed description   Download Download .zip .tar.gz  
This package can manipulate LDAP accounts setup with CodeIgniter.

It can connect to an LDAP server using configuration details retrieved from CodeIgniter configuration, like the server address and port, administration user name and password, and regular user name and password.

Currently, it can perform several types of operations like:

- Connect to a LDAP server and access as a configured administrator or regular user

- Add a given user

- Edit user

- Delete a given user

- Search for a given user

- Check if a given user record exists

Details

Using debian 8

Install open ldap

$apt-get install slapd ldap-utils

change /etc/ldap/ldap.conf for you base eg: dc=test,dc=com,dc=my

$dpkg-reconfigure slapd

install php5

$apt-get install php5 $apt-get install php5-ldap

install phpldap admin

$apt-get install phpldapadmin

codeigniter-ldap

codeigniter ldap class<br/>

for using this class , just put in /application/libraries<br/> <br/> load in config/autoload.php<br/> <br/>

$autoload['libraries'] = array('ldap');<br/> <br/> setting configure ldap <br/><br/> $config['ldap_server'] = 'localhost'; <br/> $config['ldap_port'] = '389';<br/> $config['ldap_bs'] = 'dc=test,dc=com,dc=my';<br/> $config['ldap_user'] = 'ou=users,dc=test,dc=com,dc=my';<br/> $config['ldap_admin'] = 'cn=admin,dc=test,dc=com,dc=my';<br/> $config['ldap_password'] = 'password';<br/><br/>

you nead install openldap and set the ldap admin user and password first.<br/> <br/> now you can call the class from controllers or models<br/> <br/> just <br/>

$this->ldap->test();<br/> <br/> eg:- for add user<br/> <br/> $info["givenName"]="tets";<br/> $info["sn"]=$user;<br/> $info["uid"]="tets";<br/> $info["mail"]="tets";<br/> $info["displayName"]= "tets";<br/> $info["gidNumber"] = 500;<br/> $info["uidNumber"] = 500;<br/> $info["homeDirectory"] = "/home/hasnan";<br/> $info["cn"] = $user;<br/> $info["userPassword"]="tets{sha}";<br/> $info["objectclass"][0] = "top";<br/> $info["objectclass"][1] = "person";<br/> $info["objectclass"][2] = "inetOrgPerson";<br/> $info["objectclass"][3] = "organizationalPerson";<br/> $info["objectclass"][4] = "posixAccount";<br/><br/>

$this->ldap->add_user($user,$info);


  Classes of ask sa sa  >  Codeigniter LDAP  >  Download Download .zip .tar.gz  >  Support forum Support forum  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: Codeigniter LDAP
Base name: codeigniter-ldap
Description: Manipulate LDAP accounts setup with CodeIgniter
Version: -
PHP version: 5
License: Custom (specified in a license file)
 
  Groups   Applications   Files Files  

  Groups  
Group folder image PHP 5 Classes using PHP 5 specific features View top rated classes
Group folder image User Management User records, authentication and session handling View top rated classes


  Applications that use this package  
No pages of applications that use this class were specified.

Add link image If you know an application of this package, send a message to the author to add a link here.

  Files folder image Files  
File Role Description
Plain text file Ldap.php Class Class source
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Documentation

Download Download all files: codeigniter-ldap.tar.gz codeigniter-ldap.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.
  Files folder image Files  
File Role Description
Plain text file Ldap.php Class Class source
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Documentation

Download Download all files: codeigniter-ldap.tar.gz codeigniter-ldap.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.