本文整理汇总了PHP中auth::isValidPamUser方法的典型用法代码示例。如果您正苦于以下问题:PHP auth::isValidPamUser方法的具体用法?PHP auth::isValidPamUser怎么用?PHP auth::isValidPamUser使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类auth
的用法示例。
在下文中一共展示了auth::isValidPamUser方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: authenticate
public static function authenticate($login, $pwd)
{
if (self::isValidFunctionUser($GLOBALS["auth_username"], $GLOBALS["auth_password"])) {
return true;
}
// ------------------------
var_dump(auth::isValidPamUser($login, $pwd));
var_dump(auth::isValidImapUser($login, $pwd));
if (OK_TO_CALL_MYPEAR) {
var_dump(auth::authenticateByMyPear($login, $pwd));
}
// --------------------------------------
// -- Set access parameters for authenticated user
// --------------------------------------
// self::setAccess($GLOBALS["documentClass"]);
// ------------------------
return true;
}
示例2: Test
public static function Test()
{
error_reporting(E_ALL | E_STRICT);
$stdout = "";
if (!class_exists("auth", FALSE)) {
require_once PATH_CLASSES . "/lib/auth.php";
}
// --------------------
echo "<br>OK_TO_CALL_MYPEAR=";
var_dump(OK_TO_CALL_MYPEAR);
// auth::initializeBauth();
if (!isset($_GET["r"])) {
$_GET["r"] = "";
}
if (!isset($_GET["T"])) {
$_GET["T"] = "";
}
echo "<hr>hvzm -- r";
var_dump(auth::isValidPamUser("hvzm", $_GET["r"]));
var_dump(auth::isValidImapUser("hvzm", $_GET["r"]));
echo "<hr>hvzm -- T";
var_dump(auth::isValidPamUser("hvzm", $_GET["T"]));
var_dump(auth::isValidImapUser("hvzm", $_GET["T"]));
// ---------------------------------------
// CORRECTIONS:
//
// /includes/bForm/Organiztion.inc l.16:
// 'org_affil' => 'Affil' /* HVZM */
// ---------------------------------------
if (!empty($_GET["r"]) && !empty($_GET["T"])) {
echo "<hr>";
if (isset($_SESSION["nwAuth"])) {
echo "SESSION[nwAuth]: ";
debug::rr($_SESSION["nwAuth"]);
}
if (isset($_SESSION["bAuth"]["email"])) {
debug::rr($_SESSION["bAuth"]["email"]);
} else {
echo "<p>0. No 'bAuth-email' defined";
}
echo "<pre>";
echo "0. REQUEST ";
debug::rr($_REQUEST);
echo "0. SESSION ";
print_r(array_keys($_SESSION));
echo "0. COOKIE ";
debug::rr(array_keys($_COOKIE));
echo "</pre>";
if (isset($_COOKIE["Nordita_Session"])) {
echo "<p>0. session cookie: ";
echo $_COOKIE["Nordita_Session"];
} else {
echo "<p>3. No session cookie";
}
#if (isset($_SESSION["nwAuth"]["authenticated"])) echo "<p>0. NW Session variable: ".$_SESSION["nwAuth"]["authenticated"]; else echo "<p>0. No NW session variable";
#if (isset($_SESSION["bAuth"]["email"])) echo "<p>0. MYPEAR Session variable: ".$_SESSION["bAuth"]["email"]; else echo "<p>0. No MYPEAR session variable";
if (isset($_SESSION["nwAuth"]["av"]) && is_array($_SESSION["nwAuth"]["av"]) && isset($_SESSION["nwAuth"]["av"]["av_identity"])) {
echo "<p>0. av_identity: ";
var_dump($_SESSION["nwAuth"]["av"]["av_identity"]);
} else {
echo "<p>0. No av_identity";
}
}
// --------------------
return $stdout;
}