1--TEST-- 2ldap_exop_passwd() - Changing password through EXOP 3--CREDITS-- 4Côme Chilliet <mcmic@php.net> 5--SKIPIF-- 6<?php require_once('skipif.inc'); ?> 7<?php require_once('skipifbindfailure.inc'); ?> 8--FILE-- 9<?php 10require "connect.inc"; 11 12$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version); 13insert_dummy_data($link, $base); 14 15// ldap_exop_passwd() allows to pass the DN, OLD and NEW passwords, 16// and optionally returns the NEW password if none was passed. 17// ldap_exop_passwd(resource link [, string user [, string oldpw [, string newpw [, string newpasswd ]]]]) 18var_dump( 19 $genpw = ldap_exop_passwd($link, "cn=userA,$base", "oops", "", $ctrls), 20 $ctrls, 21 $genpw = ldap_exop_passwd($link, "cn=userA,$base"), 22 test_bind($host, $port, "cn=userA,$base", $genpw, $protocol_version), 23 ldap_exop_passwd($link, "cn=userA,$base", $genpw, "newPassword"), 24 test_bind($host, $port, "cn=userA,$base", "newPassword", $protocol_version) 25); 26?> 27===DONE=== 28--CLEAN-- 29<?php 30require "connect.inc"; 31 32$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version); 33 34remove_dummy_data($link, $base); 35?> 36--EXPECTF-- 37string(%d) "%s" 38array(0) { 39} 40string(%d) "%s" 41bool(true) 42bool(true) 43bool(true) 44===DONE=== 45