reference/ldap/functions/ldap-bind.xml
fbc6f9055f47d18f8ffb30513b772a32eda1526e
...
...
@@ -10,9 +10,9 @@
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
12
<type>bool</type><methodname>ldap_bind</methodname>
13
-
<methodparam><type>resource</type><parameter>link_identifier</parameter></methodparam>
14
-
<methodparam choice="opt"><type>string</type><parameter>bind_rdn</parameter><initializer>&null;</initializer></methodparam>
15
-
<methodparam choice="opt"><type>string</type><parameter>bind_password</parameter><initializer>&null;</initializer></methodparam>
13
+
<methodparam><type>LDAP\Connection</type><parameter>ldap</parameter></methodparam>
14
+
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>dn</parameter><initializer>&null;</initializer></methodparam>
15
+
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>password</parameter><initializer>&null;</initializer></methodparam>
16
16
</methodsynopsis>
17
17
<para>
18
18
Binds to the LDAP directory with specified RDN and password.
...
...
@@ -24,22 +24,22 @@
24
24
<para>
25
25
<variablelist>
26
26
<varlistentry>
27
-
<term><parameter>link_identifier</parameter></term>
27
+
<term><parameter>ldap</parameter></term>
28
28
<listitem>
29
29
<para>
30
-
An LDAP link identifier, returned by <function>ldap_connect</function>.
30
+
&ldap.parameter.ldap;
31
31
</para>
32
32
</listitem>
33
33
</varlistentry>
34
34
<varlistentry>
35
-
<term><parameter>bind_rdn</parameter></term>
35
+
<term><parameter>dn</parameter></term>
36
36
<listitem>
37
37
<para>
38
38
</para>
39
39
</listitem>
40
40
</varlistentry>
41
41
<varlistentry>
42
-
<term><parameter>bind_password</parameter></term>
42
+
<term><parameter>password</parameter></term>
43
43
<listitem>
44
44
<para>
45
45
</para>
...
...
@@ -48,8 +48,8 @@
48
48
</variablelist>
49
49
</para>
50
50
<para>
51
-
If <parameter>bind_rdn</parameter> and <parameter>bind_password</parameter>
52
-
are not specified, an anonymous bind is attempted.
51
+
If <parameter>password</parameter>
52
+
is not specified or is empty, an anonymous bind is attempted. The <parameter>dn</parameter> can also be left empty for an anonymous bind. This is defined in https://tools.ietf.org/html/rfc2251#section-4.2.2
53
53
</para>
54
54
</refsect1>
55
55

...
...
@@ -60,6 +60,23 @@
60
60
</para>
61
61
</refsect1>
62
62

63
+
<refsect1 role="changelog">
64
+
&reftitle.changelog;
65
+
<informaltable>
66
+
<tgroup cols="2">
67
+
<thead>
68
+
<row>
69
+
<entry>&Version;</entry>
70
+
<entry>&Description;</entry>
71
+
</row>
72
+
</thead>
73
+
<tbody>
74
+
&ldap.changelog.ldap-object;
75
+
</tbody>
76
+
</tgroup>
77
+
</informaltable>
78
+
</refsect1>
79
+

63
80
<refsect1 role="examples">
64
81
&reftitle.examples;
65
82
<para>
...
...
@@ -74,7 +91,7 @@ $ldaprdn = 'uname'; // ldap rdn or dn
74
91
$ldappass = 'password'; // associated password
75
92

76
93
// connect to ldap server
77
-
$ldapconn = ldap_connect("ldap.example.com")
94
+
$ldapconn = ldap_connect("ldap://ldap.example.com")
78
95
or die("Could not connect to LDAP server.");
79
96

80
97
if ($ldapconn) {
...
...
@@ -104,7 +121,7 @@ if ($ldapconn) {
104
121
//using ldap bind anonymously
105
122

106
123
// connect to ldap server
107
-
$ldapconn = ldap_connect("ldap.example.com")
124
+
$ldapconn = ldap_connect("ldap://ldap.example.com")
108
125
or die("Could not connect to LDAP server.");
109
126

110
127
if ($ldapconn) {
...
...
@@ -131,13 +148,13 @@ if ($ldapconn) {
131
148
&reftitle.seealso;
132
149
<para>
133
150
<simplelist>
151
+
<member><function>ldap_bind_ext</function></member>
134
152
<member><function>ldap_unbind</function></member>
135
153
</simplelist>
136
154
</para>
137
155
</refsect1>
138
156

139
157
</refentry>
140
-

141
158
<!-- Keep this comment at the end of the file
142
159
Local variables:
143
160
mode: sgml
144
161