diff options
author | Christoph Burschka | 2014-01-18 13:24:03 +0100 |
---|---|---|
committer | Christoph Burschka | 2014-01-18 13:24:03 +0100 |
commit | 56bab97f97b1e6f2071d53b23232cbb92d189e4b (patch) | |
tree | 148e5114649072b003f8ff5982f2e683cade2807 /plugins/phpbb30/phpbb30.module | |
parent | Explain the cross-domain thing. (diff) | |
download | ejabberd-auth-php-56bab97f97b1e6f2071d53b23232cbb92d189e4b.tar.gz |
Add (hopefully) session auth for phpBB3.
Diffstat (limited to 'plugins/phpbb30/phpbb30.module')
-rw-r--r-- | plugins/phpbb30/phpbb30.module | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/plugins/phpbb30/phpbb30.module b/plugins/phpbb30/phpbb30.module index 2fa8b9a..e6731c8 100644 --- a/plugins/phpbb30/phpbb30.module +++ b/plugins/phpbb30/phpbb30.module @@ -9,3 +9,14 @@ function phpbb30_init($config) { require_once __DIR__ . '/BridgePhpBB30.php'; return new BridgePhpBB30($auth, $db); } + +function phpbb30_session($config) { + global $phpbb_root_path; + $phpbb_root_path = $config['root_path']; + // Bootstrap the phpBB system. + require_once __DIR__ . '/phpbb30_bootstrap.php'; + $GLOBALS['user'] = new user(); + $GLOBALS['user']->session_begin(); + return !empty($GLOBALS['user']->data['username']) ? + $GLOBALS['user']->data['username'] : FALSE; +} |