本文整理匯總了PHP中AuthLdap::getDefault方法的典型用法代碼示例。如果您正苦於以下問題:PHP AuthLdap::getDefault方法的具體用法?PHP AuthLdap::getDefault怎麽用?PHP AuthLdap::getDefault使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類AuthLdap
的用法示例。
在下文中一共展示了AuthLdap::getDefault方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: isEntityDirectoryConfigured
/**
* @since version 0.84 (before in entitydata.class)
*
* @param $entities_id
**/
static function isEntityDirectoryConfigured($entities_id)
{
$entity = new self();
if ($entity->getFromDB($entities_id) && $entity->getField('authldaps_id') > 0) {
return true;
}
//If there's a directory marked as default
if (AuthLdap::getDefault()) {
return true;
}
return false;
}
示例2: restore_error_handler
restore_error_handler();
if (isset($_GET['verbose'])) {
$verb = $_GET['verbose'];
} else {
$verb = false;
}
$server = 0;
if (isset($_GET['entity'])) {
$crit = array('id' => $_GET['entity']);
} else {
if (isset($_GET['server'])) {
if (is_numeric($_GET['server'])) {
$server = $_GET['server'];
$crit = array('authldaps_id' => $server);
} else {
$server = AuthLdap::getDefault();
$crit = array('authldaps_id' => array(0, $server));
if ($verb) {
printf("+ Use default LDAP server: %d\n", $server);
}
}
} else {
die("** Entity or server option is mandatory\n");
}
}
if (isset($_GET['limit'])) {
$crit['LIMIT'] = intval($_GET['limit']);
}
if (isset($_GET['profile'])) {
$prof = intval($_GET['profile']);
} else {
示例3: isEntityDirectoryConfigured
static function isEntityDirectoryConfigured($entities_id)
{
$entitydatas = new EntityData();
if ($entitydatas->getFromDB($entities_id) && $entitydatas->getField('authldaps_id') != NOT_AVAILABLE) {
return true;
}
//If there's a directory marked as default
if (AuthLdap::getDefault()) {
return true;
}
return false;
}