本文整理汇总了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;
}