Username: Password:
true)))->register(); use Zend\Authentication\AuthenticationService; use Zend\Authentication\Adapter\Ldap as AuthAdapter; if(isset($_REQUEST['username'])) { $options = array( 'server' => array( 'host' => '54.68.122.145', 'username' => 'cn=bindaccount.abaa,cn=users,dc=ad,dc=ldap,dc=demo', 'password' => 'passw0rd.8d8a', 'baseDn' => 'cn=users,dc=ad,dc=ldap,dc=demo', 'accountDomainName' => 'ad.ldap.demo', 'accountDomainNameShort' => 'AD', ) ); $auth = new AuthenticationService(); $adapter = new AuthAdapter($options, $_REQUEST['username'], $_REQUEST['password']); foreach($auth->authenticate($adapter)->getMessages() as $m) { echo "

$m

"; } } ?>