jeudi 16 mars 2017

How to use phpbb login in a webpage (outside the forum)

on my website I have a forum using phpbb. Now I would like to be able to authenticate the user with the forum login and password.

After some researches, I found this :

<?php
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
?>

But it doesn't work. Do you have any idea why ?




Aucun commentaire:

Enregistrer un commentaire