Hi, used phpbb integration module for some time - in one moment it worked perfectly, in one moment it stopped log people in - e.g. if i log via drupal - person is logged into drupal and PHPBB, if i log in phpbb, person is logged just for few moments (just in phpbb, not in drupal!) till he clicks anywhere or is redirected. I have cleared cache, disabled it, still it doesnt work. No changes were made to phpbb installation. everything is green in module check.

running phpbb in drupal page.

Any clues?

Comments

jgoliver’s picture

Version: 6.x-2.0-rc6 » 7.x-1.0-alpha3

I also wanted to report this exact issue using the 7.x version. Again, everything works fine if a user logs into Drupal first, but if the user tries to login via the PhpBB module, it does not authenticate.

jgoliver’s picture

I have found some more information...

In the phpbbforum.module file > function _phpbbforum_drupal_login(), around line 1252 within that function, you'll see the snippet below. It is obviously a check to see if the user is an admin. For some reason, it returns false if the user is an admin. Since I am using an admin login, I tried commenting out the "return false" and my login worked. The issue now is wondering why this was put here and what ramifications are there for removing it? Proceed at your own risk. :)

Make this:

    function _phpbbforum_drupal_login(){ 
     ...
    elseif (!_phpbbforum_check_admins($account)) {
      return false;
    }
     ...

Into this:

    function _phpbbforum_drupal_login(){ 
     ...
    elseif (!_phpbbforum_check_admins($account)) {
      //return false;
    }
     ...
madhatterwales’s picture

I too am getting exactly the same problem with 7.0 alpha3

Everything works fine from Drupal perspective (log in and out) but from phpbb perspective only log out works - log in fails on refresh to the forum.

fizk’s picture

Title: Login problem » Logging into phpBB first does not log user into Drupal
Issue tags: +ToDo
Arot’s picture

I'm having the exact same problem.

I'm willing to change the ' phpbbforum.module file > function _phpbbforum_drupal_login()' as stated by jgoliver, but I am also wondering what the consequences are.

Does the fix only work for an admin log-in or does it work for regular users as well? In my case, users who log in on the forum don't get logged in on the Drupal site. It does, however, work the other way around.

Gunnar Helliesen’s picture

Version: 7.x-1.0-alpha3 » 7.x-1.x-dev

Same issue, on 7.x-1.x-dev (the new version posted on March 27, 2012).

jmomandown’s picture

Our work around was to simply switch the phpBB login system to a drupal form. Basically you still get the same form in phpBB but it submits to drupal. Just a suggestion.

A few helpful links for doing this:
Drupal 7
Drupal 6

mariobro01’s picture

Issue summary: View changes

any one any ideas about solving this problem?