本文整理汇总了PHP中security::authenticateLogin方法的典型用法代码示例。如果您正苦于以下问题:PHP security::authenticateLogin方法的具体用法?PHP security::authenticateLogin怎么用?PHP security::authenticateLogin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类security
的用法示例。
在下文中一共展示了security::authenticateLogin方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: session_start
<?php
session_start();
include_once 'includes/configuration/core_configuration.php';
if (security::authenticateLogin($mode, $username, $password)) {
$redirect = "home.php";
$result = '';
//fetchGroups($jw99);
//fetchForms($jw99);
$groups = groups::getUserGroupNames($_SESSION['valid_user']);
$forms = array();
$username = strtolower($username);
// Record that users groups and forms in the knowledge base
$result = prolog::recordUser($username, $groups, $forms);
} else {
$redirect = "index.php?mode=failed";
}
header("Location:" . $redirect);
示例2: testSecurityLoginSuccess
function testSecurityLoginSuccess()
{
$this->assertTrue(security::authenticateLogin('login', 'test', 'test'));
}