summaryrefslogtreecommitdiff
path: root/plugins/phpbb30/phpbb30.module
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/phpbb30/phpbb30.module')
-rw-r--r--plugins/phpbb30/phpbb30.module11
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;
+}