PHP Classes

Codeigniter LDAP: Manipulate LDAP accounts setup with CodeIgniter

Recommend this page to a friend!
  Info   View files Documentation   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 33 All time: 10,999 This week: 71Up
Version License PHP version Categories
codeigniter-ldap 1.0Custom (specified...5PHP 5, User Management
Description 

Author

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

Picture of ask sa sa
  Performance   Level  
Name: ask sa sa <contact>
Classes: 4 packages by
Country: Morocco Morocco
Age: ???
All time rank: 412713 in Morocco Morocco
Week rank: 264 Up1 in Morocco Morocco Up
Innovation award
Innovation award
Nominee: 1x

Documentation

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);


  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

 Version Control Unique User Downloads Download Rankings  
 100%
Total:33
This week:0
All time:10,999
This week:71Up