当前位置: 首页>>代码示例>>PHP>>正文


PHP Authentication::do_authentication方法代码示例

本文整理汇总了PHP中Authentication::do_authentication方法的典型用法代码示例。如果您正苦于以下问题:PHP Authentication::do_authentication方法的具体用法?PHP Authentication::do_authentication怎么用?PHP Authentication::do_authentication使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Authentication的用法示例。


在下文中一共展示了Authentication::do_authentication方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

}
require_once $cfg_web_root . 'classes/configobject.class.php';
require_once $cfg_web_root . 'classes/lang.class.php';
require_once $cfg_web_root . 'lang/' . $language . '/include/common.inc';
// Include common language file that all scripts need
require_once $cfg_web_root . 'include/custom_error_handler.inc';
require_once $cfg_web_root . 'classes/dbutils.class.php';
require_once $cfg_web_root . 'classes/networkutils.class.php';
require_once $cfg_web_root . 'classes/userobject.class.php';
require_once $cfg_web_root . 'classes/authentication.class.php';
$mysqli = DBUtils::get_mysqli_link($configObject->get('cfg_db_host'), $configObject->get('cfg_db_staff_user'), $configObject->get('cfg_db_staff_passwd'), $configObject->get('cfg_db_database'), $configObject->get('cfg_db_charset'), $notice, $configObject->get('dbclass'));
//array('alreadyloggedin', array('disabled' => true), 'Disabled Already Logged In'),
$newauth = array(array('loginformfields', array('fields' => array(array('name' => 'Button1', 'description' => 'Description1', 'type' => 'input', 'defaultvalue' => ''), array('name' => 'Button2', 'description' => 'Description2', 'type' => 'input', 'defaultvalue' => ''))), 'SCT Reviewer Data Info'), array('fixedlist', array('authusers' => array('sctreviewer' => '@Password1')), 'SCT Reviewer List'));
$configObject->set('authentication', $newauth);
session_name('RogoAuthentication');
$return = session_start();
$authentication = new Authentication($configObject, $mysqli, $_REQUEST, $_SESSION);
$authentication->do_authentication($string);
if ($authentication->username != 'sctreviewer') {
    print "not expected user";
    exit;
}
$getauthobj = new stdClass();
//$authentication->get_auth_obj($getauthobj);
//$userObject = UserObject::get_instance();
//$userObject->db_user_change();
$authentication->display_debug();
$userObject = UserObject::get_instance();
var_dump($authentication);
var_dump($_REQUEST);
var_dump($userObject);
开发者ID:vinod-co,项目名称:centa,代码行数:31,代码来源:authtest.php

示例2: Authentication

if (is_null($configObject->get('cfg_db_port'))) {
    $configObject->set('cfg_db_port', 3306);
}
$mysqli = DBUtils::get_mysqli_link($configObject->get('cfg_db_host'), $configObject->get('cfg_db_username'), $configObject->get('cfg_db_passwd'), $configObject->get('cfg_db_database'), $configObject->get('cfg_db_charset'), $notice, $configObject->get('dbclass'), $configObject->get('cfg_db_port'));
$notice = UserNotices::get_instance();
if (is_null($configObject->get('display_auth_debug'))) {
    $notice->display_notice_and_exit($mysqli, $string['pagenotfound'], '"display_auth_debug" not correctly set in the config file', $string['accessdenied'], $configObject->get('cfg_root_path') . '/artwork/page_not_found.png', '#C00000', true, true);
}
if ($configObject->get('cfg_session_name') != '') {
    session_name($configObject->get('cfg_session_name'));
} else {
    session_name('RogoAuthentication');
}
$return = session_start();
$authentication = new Authentication($configObject, $mysqli, $_REQUEST, $_SESSION);
$result = $authentication->do_authentication($string);
$authinfo = $authentication->version_info();
$plugin_no = count($authinfo->plugins);
echo "<h3>User Info:</h3>";
$getauthobj = new stdClass();
$authentication->get_auth_obj($getauthobj);
$userObject = UserObject::get_instance();
$userObject->debug();
echo "<h3>Authentication Info:</h3><table cellspacing=\"0\" cellpadding=\"2\" border=\"0\" style=\"margin:10px\">\n";
echo "<tr><td class=\"sechead\">" . $string['No'] . "</td><td class=\"sechead\">" . $string['Name'] . "</td><td class=\"sechead\">" . $string['Class'] . "</td><td class=\"sechead\">" . $string['Version'] . "</td></tr>";
for ($i = 1; $i < $plugin_no; $i++) {
    echo "<tr><td>" . $authinfo->plugins[$i]->number . ".</td><td><nobr>" . $authinfo->plugins[$i]->name . "</nobr></td><td>" . $authinfo->plugins[$i]->classname . "</td><td>" . $authinfo->plugins[$i]->version . "</td></tr>\n";
}
echo "</table>\n";
echo "<br />\n";
echo "<h3>Authentication Debug:</h3>";
开发者ID:vinod-co,项目名称:centa,代码行数:31,代码来源:authdebug.php


注:本文中的Authentication::do_authentication方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。