1--TEST--
2ldap_exop_passwd() - Giving wrong value for old password
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
15var_dump(ldap_exop_passwd($link, "cn=userA,$base", "wrongPassword", "newPassword", $ctrls));
16var_dump($ctrls);
17var_dump(ldap_error($link));
18var_dump(ldap_errno($link));
19var_dump(test_bind($host, $port, "cn=userA,$base", "newPassword", $protocol_version));
20?>
21===DONE===
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===DONE===
41