我能够登录与我的网站和phpBB3的集成登录系统。我不能
注销...我尝试销毁会话,或者使用->logout();
我以以下身份登录:
$phpBBusername = $_SESSION['username'];
$phpBBpassword = $_SESSION['pswd'];
$result = $auth->login($phpBBusername, $phpBBpassword);发布于 2011-07-28 00:52:53
也许你已经找到了答案,但不管怎样:
<?php
define('IN_PHPBB', true);
$phpbb_root_path = '../phpBB3/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include("../phpBB3/common.php");
$user->session_kill();
echo 'Logged out successfully!';
?>发布于 2011-02-20 03:33:16
为什么不调用PHPBB注销例程并传递您的会话ie。例如: forums.yourphpbbforum.com/ucp.php?mode=logout&sid=d8588ab20cf81e7234342523
发布于 2013-08-14 21:23:44
public function myphpbb_logout()
{
define('IN_PHPBB', true);
global $phpEx, $user, $db, $config, $cache, $template;
$phpEx = 'php';
$phpbb_root_path = ('.\/forum\/');
require_once($phpbb_root_path . 'common.php');
set_include_path(get_include_path.PATH_SEPARATOR.$phpbb_root_path);
//logout user
$user->session_kill();
$user->session_begin();
$user->session_kill();
}注意:您需要终止会话两次:)
https://stackoverflow.com/questions/5051110
复制相似问题