Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
UNL Information Services
NMC-PHP-Framework
Commits
0f82e599
Commit
0f82e599
authored
Dec 16, 2010
by
Tim Steiner
Browse files
Check to see that the LDAP extension is enabled before attempting to use it in the Unl_Ldap class.
parent
d400c653
Changes
1
Hide whitespace changes
Inline
Side-by-side
library/Unl/Ldap.php
View file @
0f82e599
...
...
@@ -36,6 +36,10 @@ class Unl_Ldap {
*/
public
function
__construct
(
$uri
)
{
if
(
!
function_exists
(
'ldap_connect'
))
{
throw
new
Unl_Ldap_Exception
(
'The PHP LDAP extension is required and is not enabled.'
);
}
$this
->
_conn
=
ldap_connect
(
$uri
);
if
(
$this
->
_conn
===
FALSE
)
{
throw
new
Unl_Ldap_Exception
(
'Could not connect to LDAP Server'
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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