How to change ldap password using zend

Posted by NAVEED on Stack Overflow See other posts from Stack Overflow or by NAVEED
Published on 2009-12-23T11:14:21Z Indexed on 2010/05/21 9:50 UTC
Read the original article Hit count: 311

Filed under:
|

I am working with zend framework, PHP , Ldap on Ubuntu. I am authenticating users from ldap using zend library. Now I want to change user's ldap passwords using zend. Any Idea?

This is the method that I am using to get zend authentication adapter. It is working perfectly and users are authenticated using this adapter.

public function getAuthAdapter(array $params)
{
        $front = Zend_Controller_Front::getInstance();

        $options = $front->getParam('bootstrap')->getOption('ldap');
    	$params['username'] = split( "@" , $params['username'] );	    	
    	$username = 'cn=' . $params['username'][0] . ',' . $options['server1']['baseDn'];	    		    	
    	$adapter = new Zend_Auth_Adapter_Ldap( $options, $username, $params['password']);

        $adapter->setIdentity( $params['username'] );
        $adapter->setCredential( $params['password'] );

        return $adapter;
}

Now how to change ldap passwords? Thanks

© Stack Overflow or respective owner

Related posts about zend-framework

Related posts about ldap