File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
- // Main LDAP server
2
+ // Main LDAP server, format the server as "ldap://127.0.0.1"
3
3
$PMF_LDAP['ldap_server'] = '';
4
4
$PMF_LDAP['ldap_port'] = 389;
5
5
$PMF_LDAP['ldap_user'] = '';
Original file line number Diff line number Diff line change @@ -30,26 +30,26 @@ class Ldap
30
30
/**
31
31
* Error.
32
32
*
33
- * @var string
33
+ * @var string|null
34
34
*/
35
- public $ error = null ;
35
+ public ? string $ error = null ;
36
36
37
37
/**
38
38
* LDAP error number.
39
39
*
40
- * @var int
40
+ * @var int|null
41
41
*/
42
- public $ errno = null ;
42
+ public ? int $ errno = null ;
43
43
44
44
/**
45
45
* @var array
46
46
*/
47
- private $ ldapConfig ;
47
+ private array $ ldapConfig ;
48
48
49
49
/**
50
50
* @var Configuration
51
51
*/
52
- private $ config ;
52
+ private Configuration $ config ;
53
53
54
54
/**
55
55
* An LDAP link identifier, returned by ldap_connect()
@@ -61,9 +61,9 @@ class Ldap
61
61
/**
62
62
* The LDAP base.
63
63
*
64
- * @var string
64
+ * @var string|null
65
65
*/
66
- private $ base = null ;
66
+ private ? string $ base = null ;
67
67
68
68
/**
69
69
* Constructor.
@@ -99,7 +99,7 @@ public function connect(
99
99
}
100
100
101
101
$ this ->base = $ ldapBase ;
102
- $ this ->ds = ldap_connect ($ ldapServer, $ ldapPort );
102
+ $ this ->ds = ldap_connect ($ ldapServer . ' : ' . $ ldapPort );
103
103
104
104
if (!$ this ->ds ) {
105
105
$ this ->error = sprintf (
You can’t perform that action at this time.
0 commit comments