本文整理汇总了PHP中logOut函数的典型用法代码示例。如果您正苦于以下问题:PHP logOut函数的具体用法?PHP logOut怎么用?PHP logOut使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了logOut函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testLogoutLogout
public function testLogoutLogout()
{
$response = $this->auth->logOut();
$this->assertTrue($response);
$response = $this->auth - logOut();
$this->assertTrue($response);
$this->assertFalse($this->auth->isAuthenticated());
$this->assertEqual($auth->getNaam(), null);
}
示例2: protegePagina
function protegePagina()
{
global $_SG;
if (!isset($_SESSION['idUsuario']) or !isset($_SESSION['login'])) {
logOut();
} else {
if (empty($_SESSION['idUsuario']) || empty($_SESSION['login'])) {
logOut();
}
}
}
示例3: manageUsers
function manageUsers()
{
global $wpdb;
global $url, $queryStrStart;
?>
<script type="text/javascript">
function manageForm(e){
var formName = jQuery(e).attr('for');
jQuery('#signup').addClass('display-none');
jQuery('#login').addClass('display-none');
jQuery('#'+formName).removeClass('display-none');
}
</script>
<?php
createUserTable();
// if User SESSION is not set than show LOGIN, and Sign Up Form
if (!isset($_SESSION['UserId'])) {
createSignUpForm();
createLoginForm();
} else {
logOut();
$userId = $_SESSION['UserId'];
echo '<div class="row-1" style="text-align:right">
<a href="' . $url . '">Profile</a> |
<a href="' . $url . $queryStrStart . 'action=manage">Manage Property</a> |
<a href="' . $url . $queryStrStart . 'action=add">Add Property</a> |
<a href="' . $url . $queryStrStart . 'action=logout">Log Out</a>
</div>';
if (isset($_REQUEST['action']) && $_REQUEST['action'] == "add") {
proprty_manage_form();
} elseif (isset($_REQUEST['action']) && $_REQUEST['action'] == "manage") {
user_property_display($_SESSION['UserId']);
} elseif (isset($_REQUEST['action']) && $_REQUEST['action'] == "update" && isset($_REQUEST['pid'])) {
proprty_manage_form($_REQUEST['pid']);
} elseif (isset($_REQUEST['action']) && $_REQUEST['action'] == "delete" && isset($_REQUEST['pid'])) {
user_property_delete($_REQUEST['pid']);
} else {
createSignUpForm($userId);
}
}
}
示例4: session_start
<?php
session_start();
include_once 'functions.php';
$command = $_POST['command'];
$params = buildParams();
//set up testing output file
switch ($command) {
case -1:
logOut();
break;
case 0:
loggedInCheck();
break;
case 0.1:
// create user
$_SESSION['new_user'] = true;
$_SESSION['firstname'] = $_POST['firstname'];
$_SESSION['lastname'] = $_POST['lastname'];
$_SESSION['organization'] = $_POST['organization'];
$_SESSION['username'] = $_POST['username'];
$_SESSION['email'] = $_POST['email'];
$_SESSION['password'] = $_POST['password'];
echo 200;
break;
case 1:
if (isset($_SESSION['organization'])) {
$params = $params . '&username=' . $_SESSION['organization'] . '&email=' . $_SESSION['email'] . '&password=' . $_SESSION['password'];
write("case 1-creating organization:\n" . $params);
//TODO remove test case
echo 200;
示例5: filter_input
include_once '../functions/utils-function.php';
$logout = false;
if (isPostRequest()) {
$email = filter_input(INPUT_POST, 'email');
$password = filter_input(INPUT_POST, 'pass');
$logout = filter_input(INPUT_POST, 'logout');
if (isValidUser($email, $password)) {
$_SESSION['isValidUser'] = true;
} else {
$results = 'Sorry please try again';
}
}
if (isset($_SESSION['isValidUser']) && $_SESSION['isValidUser'] === true) {
include '../includes/admin-links.html.php';
}
?>
<?php
include '../includes/results.html.php';
?>
<?php
if (!isset($_SESSION['isValidUser'])) {
include '../includes/loginform.html.php';
} else {
include '../includes/logoutform.html.php';
logOut($logout);
}
?>
</body>
</html>
示例6: error_reporting
<!--початок хедера -->
<?php
error_reporting(0);
require_once "app/model/configs/init.php";
$titles = $header->find()->sort(array("index" => 1));
if (!empty($_COOKIE['site'])) {
$cat = $_COOKIE['site'];
}
switch (true) {
case isset($_POST['in']):
logIn($_POST);
break;
case isset($_GET['out']):
logOut($_GET, $_POST);
break;
}
if (empty($_COOKIE['LoginOK'])) {
?>
<div class="in">
<div class="mypage">
<div class="login">
<form class="foform" action="index.php" method = "POST" >
<div>
<label for="inputLogin">Логін</label>
<div>
<input type="text" name="login" id="inputLogin" placeholder="Email">
</div>
</div>
示例7: checkReferer
function checkReferer()
{
global $lang_session_expired;
if (empty($_SERVER["HTTP_REFERER"])) {
return 0;
}
$domain = $_SESSION["domain"];
$domain = str_replace(".", "\\.", $domain);
if (preg_match("/" . $domain . "/", $_SERVER["HTTP_REFERER"])) {
return 1;
} else {
sessionExpired($lang_session_expired);
logOut();
return 0;
}
}
示例8: logOut
<?php
include '../../settings.php';
include '../../inc/login_functions.php';
logOut($mysqli);
header("Location: ../Login/login.php");
exit;
示例9: sessionX
function sessionX()
{
$logLength = 1800;
# time in seconds :: 1800 = 30 minutes
$ctime = strtotime("now");
if (!isset($_SESSION['sessionX'])) {
$_SESSION['sessionX'] = $ctime;
} else {
if (strtotime("now") - $_SESSION['sessionX'] > $logLength && isLogged()) {
logOut();
header("Location: /login.php");
exit;
} else {
$_SESSION['sessionX'] = $ctime;
}
}
}
示例10: ProcessLogOut
function ProcessLogOut()
{
logOut();
if (isset($_REQUEST["RequestedPage"])) {
header("Location:" . $_REQUEST["RequestedPage"]);
} else {
header("Location:../security/index.php");
}
}
示例11: header
header('Access-Control-Allow-Headers: Content-Type, Content-Range, Content-Disposition, Content-Description');
require_once "db.inc.php";
$postData = file_get_contents("php://input");
$request = json_decode($postData);
$method = $request->method;
$username = $request->username;
if ($method == "login") {
$password = $request->password;
login($username, $password);
} else {
if ($method == "create") {
$password = $request->password;
create($username, $password);
} else {
if ($method == "logout") {
logOut($username);
}
}
}
function login($username, $password)
{
$data = array();
$connection = pdo_connect();
$query = <<<SQL
SELECT Password, ID
FROM USERS
WHERE Username = ?
SQL;
$statement = $connection->prepare($query);
$statement->execute(array($username));
if ($row = $statement->fetch()) {
示例12: checkLogOut
function checkLogOut()
{
if (isset($_GET["logout"]) && $_GET["logout"] == 1) {
logOut();
}
}
示例13: redirectTo
<?php
include 'header.php';
if (logOut() == 4) {
redirectTo('../index.php', 3);
echo '<div class="alert alert-success">Logout Successfully</a>.
</div>';
}