【发布时间】:2015-09-17 12:28:37
【问题描述】:
我在我的网站中使用 hybridAuth 进行社交登录(facebook、google)。它工作正常,但是当用户从我的网站注销时,它只会将他从我的网站注销,并且用户仍然在 facebook 或 google 上登录他曾经登录过的任何东西。
这是我的代码
<?php
session_start();
include('config.php');
include('hybridauth/Hybrid/Auth.php');
if($_SESSION['role'] == 'retailer')
{
$url = 'http://mysiteurl.net/demo/index.php';
}
else
{
$url = 'http://mysiteurl.net/demo/admin_index.php';
}
$hybridauth = new Hybrid_Auth();
$hybridauth->logoutAllProviders();
$_SESSION = array();
session_destroy();
header("Location: $url");
?>
我试过这个,但它不适合我。请帮帮我。提前致谢。
【问题讨论】:
标签: php facebook hybridauth