本文整理汇总了PHP中uc_user_synlogout函数的典型用法代码示例。如果您正苦于以下问题:PHP uc_user_synlogout函数的具体用法?PHP uc_user_synlogout怎么用?PHP uc_user_synlogout使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了uc_user_synlogout函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index_action
function index_action()
{
if ($_COOKIE['uid'] != "" && $_COOKIE['username'] != "") {
if ($_GET['type'] == "out") {
if ($this->config['sy_uc_type'] == "uc_center") {
$M = $this->MODEL();
$M->uc_open();
$logout = uc_user_synlogout();
} elseif ($this->config['sy_pw_type']) {
include APP_PATH . "/api/pw_api/pw_client_class_phpapp.php";
$username = $_SESSION['username'];
$pw = new PwClientAPI($username, "", "");
$logout = $pw->logout();
$this->unset_cookie();
} else {
$this->unset_cookie();
}
} else {
$this->ACT_msg("index.php", "您已经登录了!");
}
}
if ($_GET['backurl'] == '1') {
setCookie("backurl", $_SERVER['HTTP_REFERER'], time() + 60);
}
if (!$_GET['usertype']) {
$_GET['usertype'] = 1;
}
$this->yunset("usertype", $_GET['usertype']);
$this->yunset("loginname", $_COOKIE['loginname']);
$this->seo("login");
$this->yun_tpl(array('index'));
}
示例2: logOff
public function logOff()
{
$this->_uc_setcookie($this->cnf['cookie'], '', -1);
$synlogout = uc_user_synlogout();
$reload = '<script type="text/javascript">window.location.reload()</script>';
msg('登出成功' . $synlogout . $reload, 0);
#return true;
}
示例3: logout
public function logout()
{
$timestamp = TIMENOW;
hg_set_cookie('user', '', $timestamp + 31536000);
hg_set_cookie('pass', '', $timestamp + 31536000);
hg_set_cookie('member_id', 0, $timestamp + 31536000);
$syn = uc_user_synlogout();
$this->Redirect($this->lang['logoutsucess'], '', 2, 0, $syn);
}
示例4: userLogout
public function userLogout()
{
global $king;
kc_setCookie('auth_' . $king->config('userpre', 'user'), '', -86400 * 366);
$s = '';
if ($this->isuc) {
$s = uc_user_synlogout();
}
return $s;
}
示例5: logout
function logout()
{
$this->user->sessionLogout();
if ($this->company->ucenter) {
$this->output->set_output(uc_user_synlogout());
redirect('login', 'js');
} else {
redirect('login');
}
}
示例6: on_logout
function on_logout()
{
global $_G;
$ucsynlogout = uc_user_synlogout();
if ($_G['gp_formhash'] != $_G['formhash']) {
showmessage('logout_succeed', dreferer(), array('formhash' => FORMHASH, 'ucsynlogout' => $ucsynlogout));
}
clearcookies();
$_G['groupid'] = $_G['member']['groupid'] = 7;
$_G['uid'] = $_G['member']['uid'] = 0;
$_G['username'] = $_G['member']['username'] = $_G['member']['password'] = '';
$_G['setting']['styleid'] = $_G['setting']['styleid'];
showmessage('logout_succeed', dreferer(), array('formhash' => FORMHASH, 'ucsynlogout' => $ucsynlogout, 'module' => $_G['showmessage']['module'], 'tpl' => $_G['showmessage']['tpl']));
}
示例7: logout2
public function logout2()
{
$ucenter_syn = C("UCENTER_ENABLED");
$login_success = false;
if ($ucenter_syn) {
include UC_CLIENT_ROOT . "client.php";
echo uc_user_synlogout();
}
if (isset($_SESSION["user"])) {
$referer = $_SERVER["HTTP_REFERER"];
session("user", null);
//只有前台用户退出
$_SESSION['login_http_referer'] = $referer;
$this->success("退出成功!", __ROOT__ . "/");
} else {
redirect(__ROOT__ . "/");
}
}
示例8: logout
public function logout()
{
//调用退出登录的API
D('Member')->logout();
$html = '';
if (UC_SYNC && is_login() != 1) {
include_once './api/uc_client/client.php';
$html = uc_user_synlogout();
}
$oc_config = (include_once './OcApi/oc_config.php');
if ($oc_config['SSO_SWITCH']) {
include_once './OcApi/OCenter/OCenter.php';
$OCApi = new \OCApi();
$html = $OCApi->ocSynLogout();
}
exit(json_encode(array('message' => L('_SUCCESS_LOGOUT_') . L('_PERIOD_'), 'url' => U('Home/Index/index'), 'html' => $html)));
//显示页面
//$this->success($result['message'], U('Home/Index/index'));
}
示例9: API_Logout
function API_Logout()
{
include_once ONEZ_ROOT . './uc_client/client.php';
$onez = uc_user_synlogout();
$onez .= <<<ONEZ
<p align="center"><br /><br /><br /><br />
<a href="#" onclick="ReLoad()"><font size="2" color="#0000ff">正在同步退出中...</font></a>
</p>
<script type="text/javascript">
function ReLoad(){
top.location.href='{$url}';
}
window.onload=ReLoad;
</script>
ONEZ;
$GLOBALS['cookiepre'] = 'onez_';
osetcookie('userid', '', -86400);
osetcookie('username', '', -86400);
return $onez;
}
示例10: logout
public function logout()
{
//退出uc_uid
//unset($_SESSION["uc_uid"]);
if (UC_START && UC_START == 'on') {
@(include dirname(__FILE__) . '/../../config.inc.php');
if (UC_KEY == "" || UC_API == "") {
return "登陆失败,请检查uc配置文件.";
}
include dirname(__FILE__) . '/../../include/db_mysql.class.php';
include dirname(__FILE__) . '/../../uc_client/client.php';
$user = getRole('user');
$userinfo = daocall('user', 'getUser', array($user));
unregisterRole('user');
$ucsynlogout = uc_user_synlogout($userinfo['uid']);
echo $ucsynlogout;
return $this->loginForm();
}
unregisterRole('user');
return $this->loginForm();
}
示例11: actionLogout
public function actionLogout()
{
global $_G;
if (!$_G['uid']) {
dheader('location: index.php?r=site/index');
}
if ($_GET['formhash'] != $_G['formhash']) {
exit('请求来路不明');
} else {
global $_G;
require_once libfile('function/member');
$ucsynlogout = $this->setting['allowsynlogin'] ? uc_user_synlogout() : '';
clearcookies();
$_G['groupid'] = $_G['member']['groupid'] = 7;
$_G['uid'] = $_G['member']['uid'] = 0;
$_G['username'] = $_G['member']['username'] = $_G['member']['password'] = '';
$_G['setting']['styleid'] = $this->setting['styleid'];
//退出登录成功
dheader('location: ' . dreferer());
}
return true;
}
示例12: outAction
/**
* 退出登录
*/
public function outAction()
{
$oauthconfig = $this->loadOauth();
if ($oauthconfig) {
oauth_logout();
}
if ($this->session->is_set('member_id')) {
$this->session->unset_userdata('member_id');
}
if ($this->session->is_set('oauth_openid')) {
$this->session->unset_userdata('oauth_openid');
}
if ($this->session->is_set('oauth_name')) {
$this->session->unset_userdata('oauth_name');
}
if (get_cookie('member_id')) {
set_cookie('member_id', 0);
}
if (get_cookie('member_code')) {
set_cookie('member_code', 0);
}
$this->memberMsg(lang('m-log-11') . ($this->memberconfig['uc_use'] == 1 ? uc_user_synlogout() : ''), SITE_URL, 1);
}
示例13: logOff
function logOff()
{
$this->_uc_setcookie($this->cnf['cookie'], '', -1);
$synlogout = uc_user_synlogout();
msg($synlogout, 0);
}
示例14: on_logout
function on_logout()
{
global $_G;
$ucsynlogout = $this->setting['allowsynlogin'] ? uc_user_synlogout() : '';
if ($_GET['formhash'] != $_G['formhash']) {
showmessage('logout_succeed', dreferer(), array('formhash' => FORMHASH, 'ucsynlogout' => $ucsynlogout));
}
clearcookies();
$_G['groupid'] = $_G['member']['groupid'] = 7;
$_G['uid'] = $_G['member']['uid'] = 0;
$_G['username'] = $_G['member']['username'] = $_G['member']['password'] = '';
$_G['setting']['styleid'] = $this->setting['styleid'];
if (defined('IN_MOBILE')) {
showmessage('location_logout_succeed_mobile', dreferer(), array('formhash' => FORMHASH));
} else {
showmessage('logout_succeed', dreferer(), array('formhash' => FORMHASH, 'ucsynlogout' => $ucsynlogout));
}
}
示例15: ucLogout
/**
* UC注销登录
* @param int $uid
* @return string 退出登录的返回信息
*/
private function ucLogout($uid)
{
include_once SITE_PATH . '/api/uc_client/client.php';
return uc_user_synlogout();
}