WordPress.org

Ready to get started?Download WordPress

Forums

WPHPBB-Login (7 posts)

  1. WDuluoz
    Member
    Posted 7 years ago #

    I have separated the login integration I had within WPHPBB. For those of you who didn’t want to completely replace your comment system but would like to integrate your WordPress and phpBB logins, this might do the trick.
    This does not directly modify your databases.
    More information here:

    wphpbb-login

    What the plugin actually does:
    Redirects users to a login page which verifies the users login information with phpBB and logs them into WordPress accordingly. If the user doesnt exist in WP, then the user is created given the default role and logged in. If the users email or password changes (through phpBB), then the information is updated in WordPress.

  2. dazburn
    Member
    Posted 7 years ago #

    i just don't understand how to implement the if function_exists code...can you put an HTML example here?!

    Darren

  3. WDuluoz
    Member
    Posted 7 years ago #

    Ok below is the get_userdata function in functions.php of phpBB2. If you look before and after it you will see, if (!function_exists . ....) and then an endif;

    This is what I mean. You need to wrap the code for the specific function in this check to make sure it doesnt try to load it twice.

    //
    // Get Userdata, $user can be username or user_id. If force_str is true, the username will be forced.
    //
    if (!function_exists('get_userdata'))://added for wphpbb
    function get_userdata($user, $force_str = false)
    {
    global $db;

    if (!is_numeric($user) || $force_str)
    {
    $user = phpbb_clean_username($user);
    }
    else
    {
    $user = intval($user);
    }

    $sql = "SELECT *
    FROM " . USERS_TABLE . "
    WHERE ";
    $sql .= ( ( is_integer($user) ) ? "user_id = $user" : "username = '" . str_replace("\'", "''", $user) . "'" ) . " AND user_id <> " . ANONYMOUS;
    if ( !($result = $db->sql_query($sql)) )
    {
    message_die(GENERAL_ERROR, 'Tried obtaining data for a non-existent user', '', __LINE__, __FILE__, $sql);
    }

    return ( $row = $db->sql_fetchrow($result) ) ? $row : false;
    }
    endif; //Added for wphpbb

    wilbur

  4. dazburn
    Member
    Posted 7 years ago #

    ok i've implemented all of that - yet on my wordpress page (www.janet-love.com/news) there doesn't seem to be any change. As in it's not redirecting to the phpBB login page etc. Am i being completely stupid!?

    Also when I try to save the options in the wphpbb-login in WordPress admin it doesn't appear to keep them.

    What does Level to Access Dashboard mean also?

    Darren

  5. WDuluoz
    Member
    Posted 7 years ago #

    I have uploaded a new version to fix the options problems.

    WDuluoz

  6. wilef
    Member
    Posted 7 years ago #

    Wilbur,
    I'm using wphpbb for my site, but when I activate the wphpbb-login plugin, my login sidebar goes blank, as in, there are no choices to click. This is regardless of whether any of the options are checked for integrating logins. Any suggestions?
    Thanks.

  7. magicmarkuk
    Member
    Posted 7 years ago #

    Can anyone help me please?

    I am having trouble getting the logons for CH and WordPress integrated using wphpbb_login on my test forums.

    I am using

    CH 2.1.6 with attachment mod
    Wordpress 2.0.4
    wphpbb_login 0.12

    I have tried following the instructions for wphpbb_login but am not finding them easy to follow.

    Has anyone sucessfully done this and be able to help me?

    Thanks

    Mark

Topic Closed

This topic has been closed to new replies.

About this Topic