当前位置: 首页>>代码示例>>PHP>>正文


PHP logOut函数代码示例

本文整理汇总了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);
 }
开发者ID:Tjoosten,项目名称:kvd,代码行数:9,代码来源:KVDutil_Authenticator.test.php

示例2: protegePagina

function protegePagina()
{
    global $_SG;
    if (!isset($_SESSION['idUsuario']) or !isset($_SESSION['login'])) {
        logOut();
    } else {
        if (empty($_SESSION['idUsuario']) || empty($_SESSION['login'])) {
            logOut();
        }
    }
}
开发者ID:juniormelo,项目名称:eimoveis,代码行数:11,代码来源:pSeguranca.php

示例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);
        }
    }
}
开发者ID:dhaval-parekh,项目名称:cipher_wp_theme,代码行数:41,代码来源:manage-users.php

示例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;
开发者ID:jasperdavey,项目名称:CS490Project,代码行数:31,代码来源:controller.php

示例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>
开发者ID:rjedwards95,项目名称:PHPClassWinter2016,代码行数:30,代码来源:index.php

示例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>
开发者ID:qlsove,项目名称:old.faq,代码行数:31,代码来源:index.php

示例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;
    }
}
开发者ID:joyeop,项目名称:Monsta-FTP,代码行数:16,代码来源:index.php

示例8: logOut

<?php

include '../../settings.php';
include '../../inc/login_functions.php';
logOut($mysqli);
header("Location: ../Login/login.php");
exit;
开发者ID:vladvoth,项目名称:adviceList,代码行数:7,代码来源:logout.php

示例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;
        }
    }
}
开发者ID:OpenLabsHackerspace,项目名称:OSCAL2016-REST-API,代码行数:17,代码来源:lib.php

示例10: ProcessLogOut

function ProcessLogOut()
{
    logOut();
    if (isset($_REQUEST["RequestedPage"])) {
        header("Location:" . $_REQUEST["RequestedPage"]);
    } else {
        header("Location:../security/index.php");
    }
}
开发者ID:stamlercas,项目名称:csa,代码行数:9,代码来源: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()) {
开发者ID:patelas7,项目名称:mi349fall2015,代码行数:31,代码来源:login.php

示例12: checkLogOut

function checkLogOut()
{
    if (isset($_GET["logout"]) && $_GET["logout"] == 1) {
        logOut();
    }
}
开发者ID:inscriptionweb,项目名称:MonstaFTP,代码行数:6,代码来源:index.php

示例13: redirectTo

<?php

include 'header.php';
if (logOut() == 4) {
    redirectTo('../index.php', 3);
    echo '<div class="alert alert-success">Logout Successfully</a>.
                            </div>';
}
开发者ID:ishvaram,项目名称:simple-inventory,代码行数:8,代码来源:logout.php


注:本文中的logOut函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。