summaryrefslogtreecommitdiff
path: root/plugins/phpbb30/phpbb30.module
blob: e6731c80a9af7206b960380e7edc00d2a95fc09f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php

function phpbb30_init($config) {
  global $phpbb_root_path;
  $phpbb_root_path = $config['root_path'];
  // Bootstrap the phpBB system.
  require_once __DIR__ . '/phpbb30_bootstrap.php';
  // Load the plugin.
  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;
}