PhpBB3 / drupal 5

Events happening in the community are now at Drupal community events on www.drupal.org.
mconway's picture

I hope this is something someone can help me with. I am not new to PHP coding, but I am unable to do what I want, and its probably just a matter of looking at the code enough, but anyways:

I am running a test site where the main user is also the superuser. I know there is a block of code that keeps the super user from logging in to phpbb automatically.

      // If this is Drupals main admin we dont set cookies
      if($edit['uid'] == 1 || $user->uid == 1) {
drupal_set_message('(The superuser is never logged into phpBB)', 'status');
    return;
      }
      // Creates the cookies and session in phpBBs database
      $phpbb_row = _phpbb_knows_user($user->uid);
      $phpbb_username = $phpbb_row['username'];

I would like to allow them to do so (running the module for phpbb2 does allow you to do this, and I am upgrading the site for testing purposes.

Obviously, If I disable the if statement, i receive an error that my uid does not match.

I have tried for about a week to get this to work, and I can get it to set cookies, but the sessions must not match up, as I still dont get logged into phpbb.

I understand this is asking alot, but I hope someone is willing to help! :)

Comments

hi, mconway I have achieved

buffalo-king's picture

hi, mconway

I have achieved the goal, phpbb3+drupal. and I deal with the id as follows:

1. install the drupal, and create the superuser "drupaladmin" (id=1)
2. Then I create the second user for drupal, named "admin" (id=2)
3. install phpbb3 RC8, and create the superuser "admin" (id=2)
4. now, we have the same user and user id between drupal and phpbb3

maybe these suggestions  can solve your problem. :)

buffalo-king from beijing, china

thanks

mconway's picture

thanks buffalo-king. I went into my test site and updated the database. i crated a new user, then modified all tables to change my uid to 2 in drupal, this included moving nodes and all. then the new user i made uid 1. it now logs me into drupal, the only issue I have is I cant log into the admin panel by using the link in phpbb. it keeps saying my password is invalid, athough it is not. ive even reset it and tried again.

Please disregard. i reset my password again. activated it and somehow got in. then i reset it back to what it was and everything is happy again.

That is all right

buffalo-king's picture

mconway, I found that when I delete a user in drupal, the user account was still in phpbb3.
do you find the same?

buffalo-king from china

Just as a sidenote to anyone

arkepp's picture

Just as a sidenote to anyone else reading, the recommended way is to save the superusers for special occasions.

After you are all done, create a new user and make that user "founder" in phpBB (using the phpBB superuser) and create a new role with all rights in Drupal (using the Drupal superuser). You then have a user with all permissions in both applications, and no mess.

phpbb

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week