Spaces:
Sleeping
Sleeping
Download processmaker-files/thirdparty/pear/Net/LDAP/fg.php from kenken999/processmaker-community: direct link, hf CLI and curl.
- Browser
- Download file 996 Bytes
-
https://huggingface.co/spaces/kenken999/processmaker-community/resolve/main/processmaker-files/thirdparty/pear/Net/LDAP/fg.php
- Command line
-
hf download hf://spaces/kenken999/processmaker-community/processmaker-files/thirdparty/pear/Net/LDAP/fg.php
-
curl -L -o fg.php https://huggingface.co/spaces/kenken999/processmaker-community/resolve/main/processmaker-files/thirdparty/pear/Net/LDAP/fg.php
996 Bytes
| require_once('../../../../config/dmsDefaults.php'); | |
| require_once(KT_LIB_DIR . '/authentication/authenticationutil.inc.php'); | |
| require_once(KT_LIB_DIR . '/authentication/authenticationsource.inc.php'); | |
| require_once('Net/LDAP.php'); | |
| $oKTConfig =& KTConfig::getSingleton(); | |
| $oAuthenticator = KTAuthenticationUtil::getAuthenticatorForSource(2); | |
| $config = array( | |
| 'dn' => $oAuthenticator->sSearchUser, | |
| 'password' => $oAuthenticator->sSearchPassword, | |
| 'host' => $oAuthenticator->sLdapServer, | |
| 'base' => $oAuthenticator->sBaseDN, | |
| ); | |
| $oLdap =& Net_LDAP::connect($config); | |
| if (PEAR::isError($oLdap)) { | |
| var_dump($oLdap); | |
| exit(0); | |
| } | |
| $aParams = array( | |
| 'scope' => 'sub', | |
| 'attributes' => array('cn', 'dn', 'displayClass'), | |
| ); | |
| $rootDn = $oAuthenticator->sBaseDN; | |
| if (is_array($rootDn)) { | |
| $rootDn = join(",", $rootDn); | |
| } | |
| $oResults = $oLdap->search($rootDn, '(objectClass=group)', $aParams); | |
| foreach ($oResults->entries() as $oEntry) { | |
| var_dump($oEntry->dn()); | |
| } | |