简体   繁体   中英

PHPBB Login Implementation

I am trying to integrate our logins to a newly added PHPBB3 forum, but for some reason I am unable to login or the script errors without any error information, below is what I have got and I feel I have hit a dead end at the moment. I have checked other questions on here some are unanswered and some I tried the solution and I end up at the same stage, it doesn't load, below is the authentication function being called when a user logs in?

function forum_authenticate($username, $password, $email)
{
global $db, $user, $template, $auth, $phpEx, $phpbb_root_path, $config;
$fetch = $conn->query("SELECT user_password, user_id FROM phpbb_users WHERE username_clean = '".strtolower($username)."' AND user_email = '$email'");

if($fetch->num_rows == 1)
{
  $result = mysqli_fetch_assoc($fetch);

  if(phpbb_check_hash($password, $result['user_password']))
  {
    echo ''
    . '<div class="alert alert-danger">'
      . '<strong>Developer Debug Information</strong>'
      . '<br /> '
      . '<ul> '
        . '<li>You are registered</li> '
        . '<li>Username: '.$username.'</li> '
        . '<li>Password: '.$password.'</li> '
        . '<li>Email: '.$email.'</li> '
        . '<li>Hash: '.$result['user_password'].'</li> '
      . '</ul>'
    . '</div>';

    $result=$auth->login($username, $password);
    // if ($result['status'] == LOGIN_SUCCESS) {

    //   echo "You're logged in";

    // } else {

    //   echo $user->lang[$result['error_msg']];

    // }

  }

}

Any help would be appreciated.

I did a phpbb3 login from a php application:

https://developer-blog.net/webdesign/phpbb/phpbb-automatischer-login-auf-externer-seite/

It is GermanIf you do not understand look at the code. You can ask me any question.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM