Revision cb90b744
Added by Scott Ullrich over 17 years ago
etc/inc/auth.inc | ||
---|---|---|
59 | 59 |
|
60 | 60 |
function getAllowedGroups($logged_in_user) { |
61 | 61 |
global $g, $config; |
62 |
|
|
63 |
if(!function_exists("ldap_connect")) |
|
64 |
return; |
|
62 | 65 |
|
63 | 66 |
$allowed = array(); |
64 | 67 |
$allowed_groups = array(); |
... | ... | |
347 | 350 |
if($_SESSION['isSystemAdmin']) |
348 | 351 |
return $_SESSION['isSystemAdmin']; |
349 | 352 |
|
353 |
if(!function_exists("ldap_connect")) |
|
354 |
return; |
|
355 |
|
|
350 | 356 |
if($config['system']['webgui']['backend'] == "ldap") { |
351 | 357 |
$groups = ldap_get_groups($username); |
352 | 358 |
if(is_array($groups)){ |
... | ... | |
673 | 679 |
|
674 | 680 |
function ldap_get_user_ous($show_complete_ou=false) { |
675 | 681 |
global $config, $g; |
676 |
|
|
682 |
|
|
683 |
if(!function_exists("ldap_connect")) |
|
684 |
return; |
|
685 |
|
|
677 | 686 |
$ldapserver = $config['system']['webgui']['ldapserver']; |
678 | 687 |
$ldapbindun = $config['system']['webgui']['ldapbindun']; |
679 | 688 |
$ldapbindpw = $config['system']['webgui']['ldapbindpw']; |
... | ... | |
726 | 735 |
function ldap_get_groups($username) { |
727 | 736 |
global $config; |
728 | 737 |
|
738 |
if(!function_exists("ldap_connect")) |
|
739 |
return; |
|
740 |
|
|
729 | 741 |
if(!$username) |
730 | 742 |
return false; |
731 | 743 |
|
... | ... | |
815 | 827 |
|
816 | 828 |
if(!$username) |
817 | 829 |
return; |
818 |
|
|
830 |
|
|
831 |
if(!function_exists("ldap_connect")) |
|
832 |
return; |
|
833 |
|
|
819 | 834 |
$ldapserver = $config['system']['webgui']['ldapserver']; |
820 | 835 |
$ldapbindun = $config['system']['webgui']['ldapbindun']; |
821 | 836 |
$ldapbindpw = $config['system']['webgui']['ldapbindpw']; |
Also available in: Unified diff
Check that ldap_connect() exists before calling. For some reason on
bootup the function does not exist but the module is loaded?