1--TEST--
2ldap_exop_passwd() - Giving wrong value for old password
3--CREDITS--
4Côme Chilliet <mcmic@php.net>
5--EXTENSIONS--
6ldap
7--SKIPIF--
8<?php require_once('skipifbindfailure.inc'); ?>
9--FILE--
10<?php
11require "connect.inc";
12
13$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
14insert_dummy_data($link, $base);
15
16var_dump(ldap_exop_passwd($link, "cn=userA,$base", "wrongPassword", "newPassword", $ctrls));
17var_dump($ctrls);
18var_dump(ldap_error($link));
19var_dump(ldap_errno($link));
20var_dump(test_bind($host, $port, "cn=userA,$base", "newPassword", $protocol_version));
21?>
22--CLEAN--
23<?php
24require "connect.inc";
25
26$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
27
28remove_dummy_data($link, $base);
29?>
30--EXPECTF--
31Warning: ldap_exop_passwd(): Passwd modify extended operation failed: %s (53) in %s on line %d
32bool(false)
33array(0) {
34}
35string(30) "Server is unwilling to perform"
36int(53)
37
38Warning: ldap_bind(): Unable to bind to server: Invalid credentials in %s on line %d
39bool(false)
40