本文整理汇总了PHP中LightOpenID::revalidate方法的典型用法代码示例。如果您正苦于以下问题:PHP LightOpenID::revalidate方法的具体用法?PHP LightOpenID::revalidate怎么用?PHP LightOpenID::revalidate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LightOpenID
的用法示例。
在下文中一共展示了LightOpenID::revalidate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: LoadPage
static function LoadPage($PageName, $Wrapper = true)
{
if (KERNEL::IsValidPage($PageName) == false) {
KERNEL::OnError("Attempt to load invalid page '" . $PageName . "'");
}
if (!is_null(KERNEL::$Pages[$PageName][2])) {
$Result = call_user_func(KERNEL::$Pages[$PageName][2]);
if ($Result !== true) {
KERNEL::OnError("Access Denied - " . $Result);
die("");
// Force cancel just incase
}
}
if ($Wrapper) {
global $GMDConfig;
$OpenID = new LightOpenID($GMDConfig["Domain"]);
if ($OpenID->validate()) {
$ID = $OpenID->identity;
$URL_Parts = explode("/", $ID);
// Get their SteamID
$CommunityID = $URL_Parts[sizeof($URL_Parts) - 1];
$SteamID = CommunityToSteam($CommunityID);
// Try and authenticate them
$User = User::GetByField("User", "SteamID", $SteamID);
if ($User->IsReal()) {
$User->AuthToUser();
} else {
User::RegisterUser($SteamID, $_SERVER['REMOTE_ADDR'])->AuthToUser();
}
KERNEL::HardNavigate("home");
} elseif ($_GET["page"] == "login") {
if (User::$ActiveUser != false) {
if (isset($_GET["logout"])) {
User::Logout();
}
KERNEL::HardNavigate("home");
} else {
$OpenID->identity = 'http://steamcommunity.com/openid';
header('Location: ' . $OpenID->authUrl());
}
}
LightOpenID::revalidate();
}
global $OutputData;
$OutputData = "";
if ($Wrapper) {
require "includes/util/header.php";
}
require "pages/" . $PageName . "/_process.php";
require "pages/" . $PageName . "/_display.php";
echo $OutputData;
if ($Wrapper) {
require "includes/util/footer.php";
}
}