本文整理汇总了PHP中Guardian::SetEncryptedPassword方法的典型用法代码示例。如果您正苦于以下问题:PHP Guardian::SetEncryptedPassword方法的具体用法?PHP Guardian::SetEncryptedPassword怎么用?PHP Guardian::SetEncryptedPassword使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Guardian
的用法示例。
在下文中一共展示了Guardian::SetEncryptedPassword方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Guardian
}
}
$id = $_COOKIE["cookie_userid"];
$username = $_COOKIE["cookie_username"];
$password = $_COOKIE["cookie_password"];
$guardian = new Guardian();
$guardian->SetDatabase($database);
$guardian->TerminateExpiredSessions();
if (isset($_POST["p_username"]) && isset($_POST["p_password"])) {
$guardian->SetUsername($_POST["p_username"]);
$guardian->SetPassword($_POST["p_password"]);
} else {
if (isset($_COOKIE["cookie_username"]) && isset($_COOKIE["cookie_password"]) && isset($_COOKIE["cookie_userid"])) {
$guardian->SetId($_COOKIE["cookie_userid"]);
$guardian->SetUsername($_COOKIE["cookie_username"]);
$guardian->SetEncryptedPassword($_COOKIE["cookie_password"]);
} else {
$guardian->SetUsername("guest");
$guardian->SetPassword("guest");
}
}
$guardian->SetModuleName($module_name);
if ($module_name != "error") {
if (!$guardian->CheckPermission()) {
echo "<script language='Javascript'>window.location = \"/" . $WEB_SITE . "pages/pgError.php\";</script>";
} else {
$session = new Session();
$session->SetDatabase($database);
if ($guardian->GetId() != "") {
$session_id = $session->Login($guardian->GetId(), $guardian->GetUsername(), $guardian->GetEncryptedPassword());
} else {