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


PHP logoutUser函数代码示例

本文整理汇总了PHP中logoutUser函数的典型用法代码示例。如果您正苦于以下问题:PHP logoutUser函数的具体用法?PHP logoutUser怎么用?PHP logoutUser使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了logoutUser函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: view

	public function view()
	{
		session_start();
		logoutUser();
		
		header('Location: '.$_SERVER['HTTP_REFERER']);
	}
开发者ID:ngduc,项目名称:Thin-PHP-Framework,代码行数:7,代码来源:SignOut.php

示例2: loadTemplateSafelyByGroup

/**
 * Load a given view if the logged user have the required group
 * @param $requiredGroup - String with the group required to access the asked view
 * @param $template - String with the view to be loaded
 * @param $data - Data to pass along the view
 */
function loadTemplateSafelyByGroup($requiredGroup, $template, $data = array())
{
    $group = new Module();
    $ci = get_instance();
    $userHasGroup = $group->checkUserGroup($requiredGroup);
    if ($userHasGroup) {
        $ci->load->template($template, $data);
    } else {
        logoutUser();
    }
}
开发者ID:kailIII,项目名称:SiGA,代码行数:17,代码来源:auth_helper.php

示例3: main

 function main($itsp)
 {
     $itsp->bLang->setLanguage($_GET["lang"]);
     $valid = isValidUser();
     if ($valid) {
         logoutUser();
         include_once "urls_backend.php";
         $urls = new urls_backend();
         $params = array();
         $logouturl = $urls->newUrl("frontpage", $params);
         print '<META HTTP-EQUIV="Refresh" Content = "0;URL=' . config::basehref . '">';
     } else {
         print "access denied";
     }
 }
开发者ID:johnny-s,项目名称:itsplanned.com,代码行数:15,代码来源:logout.php

示例4: Sanitize

 /**
  * @implements <SessionBase::Sanitize>
  */
 function Sanitize()
 {
     global $CONFIG;
     $lt = $CONFIG['session']['lifetime'];
     $prefix = $CONFIG['session']['prefix'];
     if (isset($_SESSION[$prefix . "session_lastaccess"]) && $_SESSION[$prefix . "session_lastaccess"] < time() - $lt * 60) {
         // session timed out
         // Implementations in system/modules/authorization.php and
         // common/modules/fax_authorization.php
         if (function_exists('logoutUser')) {
             logoutUser();
         }
     }
     if ($CONFIG['session']['iplock']) {
         $ip_address = get_ip_address();
         if (isset($_SESSION[$prefix . 'ip_address']) && function_exists('logoutUser') && $_SESSION[$prefix . 'ip_address'] != $ip_address) {
             logoutUser();
         }
         $_SESSION[$prefix . 'ip_address'] = $ip_address;
     }
 }
开发者ID:Naveenr9,项目名称:WebFramework,代码行数:24,代码来源:phpsession.class.php

示例5: ini_set

<?php

ini_set("memory_limit", "3000000000000000M");
require_once 'config.php';
require_once 'common.php';
require_once 'functions.php';
dashboardInit();
$arrData = array();
// login user if required
$arr = loginUser($_POST);
$arr = logoutUser($_POST, $arr);
$regType = $_GET[regr] == "minireg" ? "minireg" : "smoke";
$tableQuery = $_GET[regr] == "minireg" ? "miniregResults" : "regressionResults";
if (isset($_POST['Save'])) {
    foreach ($_POST as $name => $val) {
        if ($val == "Save") {
            continue;
        }
        ereg("([a-z]+)-([0-9]+)", $name, $regs);
        $type = $regs[1];
        $build = $regs[2];
        if ($type == "comment") {
            updateRapRegComment($build, $val, $tableQuery);
        } elseif ($type == "bug") {
            updateBugs2($build, $val, $tableQuery);
        } elseif ($type == "analysis") {
            updateAnalysisStatus2($build, $val, $tableQuery);
        } elseif ($type == "runstatus") {
            updateRunStatus($build, $val, $tableQuery);
        }
    }
开发者ID:window98lsq,项目名称:autoweb,代码行数:31,代码来源:searchReg.php

示例6: logoutUser

        ?>
<script>var b = true;</script><?php 
        //echo 'Καλώς Ήρθατε '.$_POST['username'];
        //header('Location: index.php');
    } else {
        //echo '<h1>Λάθος Username ή Password</h1>';
        //echo "<button onclick=\"window.location='index.php?p=login'\">Προσπαθήστε ξανά</button>";
        ?>
<script>var a = true;</script><?php 
    }
} else {
    if (isset($_POST['logOut'])) {
        ?>
<script>var msg = "Goodbye ";</script><?php 
        //echo 'Goodbye '.$_SESSION['username'];
        logoutUser();
        header('Location: index.php');
    } else {
        if (isset($_POST['logoutMy'])) {
            session_start();
            unset($_SESSION['userID']);
            unset($_SESSION['userType']);
            ?>
<script>var msg = "Goodbye ";</script><?php 
            //echo 'Goodbye '.$_SESSION['username'];
            unset($_SESSION['username']);
            //logoutUser();
            //header('Location: index.php');
        }
    }
}
开发者ID:dimosyiangou,项目名称:aimodosiatest,代码行数:31,代码来源:topSingin.php

示例7: unset

}
/*
* reset eCredit sessions
*
*/
if ($_SESSION['eCreditsInit']) {
    unset($_SESSION['eCreditsInit']);
    unset($_SESSION['eCreditsAwardTo']);
    unset($_SESSION['eCredits_start']);
}
/*
* logout user
*
*/
if (isset($_REQUEST['logout'])) {
    logoutUser($_SESSION['username'], $_SESSION['room']);
    if ($_REQUEST['logout'] == 'kick') {
        banKickUser('KICK', $_SESSION['username']);
    }
    unset($_SESSION['username']);
    unset($_SESSION['userid']);
    unset($_SESSION['room']);
    unset($_SESSION['guest']);
    $loginError = C_LANG5;
    if ($CONFIG['CMS']) {
        die($loginError);
    } else {
        include "templates/" . $CONFIG['template'] . "/login.php";
        die;
    }
}
开发者ID:TheWandererLee,项目名称:Git-Projects,代码行数:31,代码来源:index.php

示例8: session_start

<?php

session_start();
error_reporting(E_ALL);
ini_set("display_errors", "on");
include "settings.inc.php";
include "lang/en.inc.php";
include "function.php";
include _LIBPATH . "functions.custom.inc.php";
include "dbaccess.class.php";
ini_set('memory_limit', "32M");
logoutUser(_APPNAME);
//Logout user if request to logout
if (!isLoggedIn(_APPNAME)) {
    redirectPage("login.php");
}
//Create DBAccess Instance
$mySqlObj = new dBAccess(_DBHOST, _DBUSERNAME, _DBPASSWORD);
//MySQL Database Instance
$mySqlObj->selectDB(_DBNAME);
//$mySqlObj -> enableDebugMode();
$pageJS = "";
/*initAJAX(_APPNAME, _USEAJAX);
if(getAJAXState(_APPNAME)){
	$pageJS = getAjaxJS();	
}*/
$incRPC = true;
include "rpc.php";
$disPageCont = "<div id=\"content\">" . $_disContentBody . "</div>";
include "nav.php";
showHeaderHTML("Management Console", "appstyle.css", $pageJS);
开发者ID:hderanga,项目名称:snaptag,代码行数:31,代码来源:index.php

示例9: saveUser

        saveUser($option, $task);
        break;
    case 'remove':
        removeUsers($cid, $option);
        break;
    case 'block':
        changeUserBlock($cid, 1, $option);
        break;
    case 'unblock':
        changeUserBlock($cid, 0, $option);
        break;
    case 'logout':
        logoutUser($cid, $option, $task);
        break;
    case 'flogout':
        logoutUser($id, $option, $task);
        break;
    case 'cancel':
        cancelUser($option);
        break;
    case 'contact':
        $contact_id = mosGetParam($_POST, 'contact_id', '');
        mosRedirect('index2.php?option=com_contact&task=editA&id=' . $contact_id);
        break;
    default:
        showUsers($option);
        break;
}
function showUsers($option)
{
    global $database, $mainframe, $my, $acl, $mosConfig_list_limit;
开发者ID:jwest00724,项目名称:mambo,代码行数:31,代码来源:admin.users.php

示例10: logoutUser

function logoutUser($request)
{
    if (isset($_COOKIE['usuarioid'])) {
        unset($_COOKIE['usuarioid']);
        setcookie('usuarioid', $_POST['usuarioid'], time() - 1);
    }
    session_destroy();
    redirect("../index.php");
}
$request = new Request();
$action = $request->action;
switch ($action) {
    case "redirecRegistrar":
        redirecRegistro($request);
        break;
    case "nuevoUser":
        nuevoUser($request);
        break;
    case "validar":
        validateUser($request);
        break;
    case "actualizar":
        updateUser($request);
        break;
    case "logout":
        logoutUser($request);
        break;
    default:
        listar($request);
        break;
}
开发者ID:nikobm90,项目名称:TurnosAutos,代码行数:31,代码来源:actions.php

示例11: changeUserBlock

/**
* Blocks or Unblocks one or more user records
* @param array An array of unique category id numbers
* @param integer 0 if unblock, 1 if blocking
* @param string The current url option
*/
function changeUserBlock($cid = null, $block = 1, $option)
{
    global $database;
    josSpoofCheck();
    $action = $block ? 'block' : 'unblock';
    if (count($cid) < 1) {
        echo "<script type=\"text/javascript\"> alert('Select an item to {$action}'); window.history.go(-1);</script>\n";
        exit;
    }
    $msg = checkUserPermissions($cid, $action);
    if ($msg) {
        echo "<script type=\"text/javascript\"> alert('" . $msg . "'); window.history.go(-1);</script>\n";
        exit;
    }
    mosArrayToInts($cid);
    $cids = 'id=' . implode(' OR id=', $cid);
    $query = "UPDATE #__users" . "\n SET block = " . (int) $block . "\n WHERE ( {$cids} )";
    $database->setQuery($query);
    if (!$database->query()) {
        echo "<script> alert('" . $database->getErrorMsg() . "'); window.history.go(-1); </script>\n";
        exit;
    }
    // if action is to block a user
    if ($block == 1) {
        foreach ($cid as $id) {
            // delete user acounts active sessions
            logoutUser($id, 'com_users', 'block');
        }
    }
    mosRedirect('index2.php?option=' . $option);
}
开发者ID:jwest00724,项目名称:Joomla-1.0,代码行数:37,代码来源:admin.users.php

示例12: isValidUser

function isValidUser($config)
{
    if (!isset($_SESSION['validUser']) || $_SESSION['validUser'] != true) {
        return false;
    } else {
        $timeout = 60;
        //minutes
        if ($_SESSION['timeout'] + $timeout * 60 < time()) {
            //User has been inactive for 30 minutes
            popUpMessage("Your Session has Timed Out. Please log back in");
            logoutUser($config, "Session Timeout after " . $timeout . " Minutes");
            return false;
        } else {
            return true;
        }
    }
}
开发者ID:rwgt0su,项目名称:web-time-sheet,代码行数:17,代码来源:common.php

示例13: performAction_home

function performAction_home($getPage_connection2)
{
    if ($_SESSION["action"] == "register") {
        registerUser($getPage_connection2);
    } else {
        if ($_SESSION["action"] == "logout") {
            logoutUser($getPage_connection2);
        }
    }
    // else
}
开发者ID:barnesb25,项目名称:worldsthegame,代码行数:11,代码来源:functions_home.php

示例14: infoCustomer

        $data = infoCustomer(Functions::get('id'));
        break;
    case 'delete':
        $data = deleteCustomer(Functions::get('id'));
        break;
    case 'total_entries':
        $data = getTotalEntries(Functions::get('id'));
        break;
    case 'total_sells':
        $data = getTotalSells(Functions::get('id'));
        break;
    case 'balance':
        $data = getBalance(Functions::get('id'));
        break;
    case 'favdrink':
        $data = getFavDrink(Functions::get('id'));
        break;
    case 'login':
        $data = loginUser();
        break;
    case 'logout':
        $data = logoutUser();
        break;
    case 'list':
        $data = listCustomers();
        break;
    default:
        Functions::setResponse(400);
}
/* </controller> */
loadview('json', $data);
开发者ID:Babaritech,项目名称:babar2,代码行数:31,代码来源:customer.php

示例15: displayContent

function displayContent($wts_content, $config)
{
    if ($wts_content->isHome) {
        ?>
        <div class="post"><?php 
        displayWelcome($config);
        ?>
<div class="clear"></div></div><div class="divider"></div>
        <?php 
        displayAnnounce($config);
    }
    if ($wts_content->isWelcome()) {
        ?>
        <div class="post"><?php 
        displayWelcome($config);
        ?>
<div class="clear"></div></div><div class="divider"></div>
        <?php 
    }
    if ($wts_content->isAbout) {
        ?>
        <div class="post"><?php 
        displayAbout($config);
        ?>
<div class="clear"></div></div><div class="divider"></div>
        <?php 
    }
    if (isValidUser($config)) {
        if ($wts_content->isAnounceAdmin) {
            ?>
            <div class="post"><?php 
            displayAdminAnnounce($config);
            ?>
<div class="clear"></div></div><div class="divider"></div>
            <?php 
        }
        if ($wts_content->isLeaveForm) {
            ?>
            <div class="post"><?php 
            displayLeaveForm($config);
            ?>
<div class="clear"></div></div><div class="divider"></div>
            <?php 
        }
        if ($wts_content->isTimeRequestForm) {
            ?>
            <div class="post"><?php 
            displayNewTimeRequestForm($config);
            ?>
<div class="clear"></div></div><div class="divider"></div>
            <?php 
        }
        if ($wts_content->isSubmittedRequests) {
            ?>
            <div class="post"><?php 
            displaySubmittedRequests($config);
            ?>
<div class="clear"></div></div><div class="divider"></div>
            <?php 
        }
        if ($wts_content->isSubmittedRequestsNEW) {
            ?>
            <div class="post"><?php 
            displaySubmittedRequestsNEW($config);
            ?>
<div class="clear"></div></div><div class="divider"></div>
            <?php 
        }
        if ($wts_content->isLeaveApproval) {
            ?>
            <div class="post"><?php 
            displayLeaveApprovalNEW($config);
            ?>
<div class="clear"></div></div><div class="divider"></div>
            <?php 
        }
        if ($wts_content->isUserMenu) {
            ?>
            <div class="post"><?php 
            displayUserMenu($config);
            ?>
<div class="clear"></div></div><div class="divider"></div>
            <?php 
        }
        if ($wts_content->isLogout()) {
            logoutUser($config, "You have logged out");
        }
        if ($wts_content->isSearching) {
            ?>
            <div class="post"><?php 
            searchPage($config);
            ?>
<div class="clear"></div></div><div class="divider"></div>
            <?php 
        }
        if ($wts_content->isUpdateProfile) {
            ?>
            <div class="post"><?php 
            displayUpdateProfile($config);
            ?>
//.........这里部分代码省略.........
开发者ID:rwgt0su,项目名称:web-time-sheet,代码行数:101,代码来源:wts_content.php


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