Recommend this page to a friend! |
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 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 .zip .tar.gz | > | Support forum | > | Blog | > | Latest changes |
|
Groups | Applications | Files |
Groups |
PHP 5 | Classes using PHP 5 specific features | View top rated classes |
User Management | User records, authentication and session handling | View top rated classes |
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.
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.
|
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.
|