本文整理汇总了PHP中AdminPage::authenticate方法的典型用法代码示例。如果您正苦于以下问题:PHP AdminPage::authenticate方法的具体用法?PHP AdminPage::authenticate怎么用?PHP AdminPage::authenticate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AdminPage
的用法示例。
在下文中一共展示了AdminPage::authenticate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: header
if ($relationship_sort->validate_request()) {
$relationship_sort->run();
}
}
reason_include_once('classes/admin/admin_page.php');
/**
* Reason 4 Beta 8 adds a setting DISABLE_REASON_ADMINISTRATIVE_INTERFACE, which is more specific than DISABLE_REASON_LOGIN,
* and gets used if it is defined.
*/
if (defined('DISABLE_REASON_ADMINISTRATIVE_INTERFACE') ? DISABLE_REASON_ADMINISTRATIVE_INTERFACE : DISABLE_REASON_LOGIN) {
header('Location: /errors/maintenance.php');
//?estimate='.$maintenance_estimate );
die;
}
$f = new AdminPage();
$authenticated = $f->authenticate();
if ($authenticated) {
$f->init();
// init returns false if the user cannot be authentication
if ($f->should_run_api()) {
$f->run_api();
exit;
} else {
$f->run();
}
} else {
if (reason_unique_name_exists('unauthorized_reason_user')) {
$e = new entity(id_of('unauthorized_reason_user'));
echo $e->get_value('content');
} else {
echo '<p>We\'re sorry, but we do not have any record of you being an authorized Reason user.</p>';