Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fusiondirectory
fusiondirectory
Commits
f69aaa86
Commit
f69aaa86
authored
Feb 06, 2017
by
Côme Chilliet
Committed by
Côme Chilliet
Feb 08, 2017
Browse files
Fixes
#5371
Avoid PHP errors because of passing result of new directly as reference
parent
38262551
Changes
1
Hide whitespace changes
Inline
Side-by-side
include/functions.inc
View file @
f69aaa86
...
...
@@ -582,11 +582,13 @@ function ldap_login_user ($username, $password)
/* password check, bind as user with supplied password */
$ldap
->
disconnect
();
$ldap
=
new
ldapMultiplexer
(
new
LDAP
(
$ui
->
dn
,
$password
,
$config
->
current
[
'SERVER'
],
isset
(
$config
->
current
[
'LDAPFOLLOWREFERRALS'
])
&&
$config
->
current
[
'LDAPFOLLOWREFERRALS'
]
==
'TRUE'
,
isset
(
$config
->
current
[
'LDAPTLS'
])
&&
$config
->
current
[
'LDAPTLS'
]
==
'TRUE'
));
$ldapObj
=
new
LDAP
(
$ui
->
dn
,
$password
,
$config
->
current
[
'SERVER'
],
isset
(
$config
->
current
[
'LDAPFOLLOWREFERRALS'
])
&&
$config
->
current
[
'LDAPFOLLOWREFERRALS'
]
==
'TRUE'
,
isset
(
$config
->
current
[
'LDAPTLS'
])
&&
$config
->
current
[
'LDAPTLS'
]
==
'TRUE'
);
$ldap
=
new
ldapMultiplexer
(
$ldapObj
);
if
(
!
$ldap
->
success
())
{
return
NULL
;
}
...
...
@@ -2535,7 +2537,8 @@ function check_schema($cfg)
$checks
=
array
();
/* Get objectclasses */
$ldap
=
new
ldapMultiplexer
(
new
LDAP
(
$cfg
[
'admin'
],
$cfg
[
'password'
],
$cfg
[
'connection'
],
FALSE
,
$cfg
[
'tls'
]));
$ldapObj
=
new
LDAP
(
$cfg
[
'admin'
],
$cfg
[
'password'
],
$cfg
[
'connection'
],
FALSE
,
$cfg
[
'tls'
])
$ldap
=
new
ldapMultiplexer
(
$ldapObj
);
$objectclasses
=
$ldap
->
get_objectclasses
(
TRUE
);
if
(
count
(
$objectclasses
)
==
0
)
{
msg_dialog
::
display
(
_
(
'LDAP warning'
),
_
(
'Cannot get schema information from server. No schema check possible!'
),
WARNING_DIALOG
);
...
...
Côme Chilliet
@cchilliet
mentioned in issue #1716
·
Sep 02, 2017
mentioned in issue #1716
mentioned in issue #1716
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment