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


PHP auth::logout方法代码示例

本文整理汇总了PHP中auth::logout方法的典型用法代码示例。如果您正苦于以下问题:PHP auth::logout方法的具体用法?PHP auth::logout怎么用?PHP auth::logout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在auth的用法示例。


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

示例1: logout

 /**
  */
 public function logout()
 {
     if ($access_token = $this->input['access_token']) {
         $data['access_token'] = $access_token;
     } else {
         $this->errorOutput(NO_ACCESS_TOKEN);
     }
     $Members = new members();
     $device_token = $Members->check_device_token(trim($this->input['device_token']));
     $udid = $Members->check_udid(trim($this->input['uuid']));
     if ($device_token === 0) {
         $this->errorOutput(ERROR_DEVICE_TOKEN);
     }
     if ($udid === 0) {
         $this->errorOutput(ERROR_UDID);
     }
     $auth = new auth();
     $logoutInfo = $auth->logout($data);
     //会员痕迹
     $member_trace_data = array('member_id' => $logoutInfo['user_id'], 'member_name' => $logoutInfo['user_name'], 'content_id' => $logoutInfo['user_id'], 'title' => $logoutInfo['user_name'], 'type' => 'logout', 'op_type' => '退出', 'appid' => $logoutInfo['appid'], 'appname' => $logoutInfo['display_name'], 'create_time' => TIMENOW, 'ip' => hg_getip(), 'device_token' => $device_token, 'udid' => $udid);
     $mMember = new member();
     $mMember->member_trace_create($member_trace_data);
     $_logoutInfo = array('member_id' => $logoutInfo['user_id'], 'member_name' => $logoutInfo['user_name'], 'is_member' => $logoutInfo['is_member'], 'logout' => $logoutInfo['logout']);
     $this->addItem($_logoutInfo);
     $this->output();
 }
开发者ID:h3len,项目名称:Project,代码行数:28,代码来源:logout.php

示例2: index

 public function index()
 {
     access::verify_csrf();
     auth::logout();
     if ($continue_url = Input::instance()->get("continue_url")) {
         url::redirect($continue_url);
     }
     url::redirect(item::root()->abs_url());
 }
开发者ID:kandsten,项目名称:gallery3,代码行数:9,代码来源:logout.php

示例3: index

 public function index()
 {
     auth::logout();
     if ($continue_url = Input::instance()->get("continue")) {
         $item = url::get_item_from_uri($continue_url);
         if (access::can("view", $item)) {
             // Don't use url::redirect() because it'll call url::site() and munge the continue url.
             header("Location: {$continue_url}");
         } else {
             url::redirect(item::root()->abs_url());
         }
     }
 }
开发者ID:viosca,项目名称:gallery3,代码行数:13,代码来源:logout.php

示例4: party

    // If without party-module: just give a fake ID, for many modules need it
    class party
    {
        var $party_id;
    }
    $party = new party();
    $party->party_id = (int) $cfg['signon_partyid'];
}
if ($config['environment']['configured'] != 0) {
    if ($_GET['mod'] == 'auth') {
        switch ($_GET['action']) {
            case 'login':
                $auth = $authentication->login($_POST['email'], $_POST['password']);
                break;
            case 'logout':
                $auth = $authentication->logout();
                $_GET['mod'] = 'home';
                break;
            case 'switch_to':
                // Switch to user
                $authentication->switchto($_GET["userid"]);
                break;
            case 'switch_back':
                // Switch back to Adminuser
                $authentication->switchback();
                break;
        }
    }
}
### Set Default-Design, if non is set
/*
开发者ID:eistr2n,项目名称:lansuite,代码行数:31,代码来源:index.php

示例5: auth

/**********************************************************************
 *	N/X - Web Content Management System
 *	Copyright 2002 Sven Weih, FZI Research Center for Information Technologies
 *	www.fzi.de
 *
 *	This file is part of N/X.
 *	The initial has been setup as a small diploma thesis (Studienarbeit) at the FZI.
 *	It was be coached by Prof. Werner Zorn and Dipl.-Inform Thomas Gauweiler.
 *
 *	N/X is free software; you can redistribute it and/or modify
 *	it under the terms of the GNU General Public License as published by
 *	the Free Software Foundation; either version 2 of the License, or
 *	(at your option) any later version.
 *
 *	N/X is distributed in the hope that it will be useful,
 *	but WITHOUT ANY WARRANTY; without even the implied warranty of
 *	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *	GNU General Public License for more details.
 *
 *	You should have received a copy of the GNU General Public License
 *	along with N/X; if not, write to the Free Software
 *	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 **********************************************************************/
require_once "../../config.inc.php";
$auth = new auth("ANY");
$auth->logout();
session_destroy();
$db->close();
// forward to login page
header("Location: " . $c["docroot"] . "api/auth/loginform.php");
exit;
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:31,代码来源:logout.php

示例6: auth

<?php

// Initialize
global $template, $auth;
// Logout
$client = new auth();
$client->logout();
$GLOBALS['userid'] = 0;
// User message
$template->add_message("You have been succesfully logged out.");
开发者ID:nachatate,项目名称:synala,代码行数:10,代码来源:logout.php

示例7:

                  </form>';
    }
} else {
    //login form if we don't have action
    echo '
                  <form action="" method="post">
                  <input type="text" name="nick" placeholder="Логин" required>
                  <input type="password" name="pass" placeholder="Пароль" required>
                  <input type="submit" name="login" value="Авторизироваться!">
                  </form>
                  <a href="?action=register">Register</a>
                  ';
}
if (isset($_GET['action']) and $_GET['action'] == 'logout') {
    //logouting
    $user->logout();
}
if (isset($_POST['login'])) {
    //logging
    if ($user->login($_POST['nick'], $_POST['pass'])) {
    } else {
        echo $user->error_msg;
    }
}
if (isset($_POST['register'])) {
    //registering
    if ($user->register($_POST['nick'], $_POST['email'], $_POST['pass'], $_POST['r_pass'], $_POST['name'])) {
    } else {
        echo $user->error_msg;
    }
}
开发者ID:smsochneg,项目名称:Qeebee,代码行数:31,代码来源:login.php

示例8: logout

 /**
  *
  */
 public function logout()
 {
     auth::logout();
     return Redirect()->intended('login');
 }
开发者ID:jatan,项目名称:Application,代码行数:8,代码来源:userController.php


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