• I can’t get Auth Mode to go “OK”

    I’ve been selecting “wpbb” as the second path on the options page but when I save it, it keeps coming back to Apache.

    I’m using WordPress 2.9.1 and the latest version of PHPBB Single Sign On.

    Please help!

Viewing 15 replies - 46 through 60 (of 61 total)
  • get_profile is depricated so in module.wp.php change:
    return get_profile('id', $user);
    to
    return (int) get_user_id_from_string($user);

    in module.phpbb.php and change:
    define('IN_PHPBB', true);
    to

    if(!defined('IN_PHPBB')) {
                define('IN_PHPBB', true);
            }

    Displaying error messages on login hasn’t been fully implemented, so:

    In module.phpbb.php change:
    function login($uname, $passwd){
    to

    function login($uname, $passwd){
        global $user;

    In connect-phpbb.php change:
    return 0;
    to
    return new WP_Error('broke', __($result["error"]));

    Sorry for a stupid question but will these fixes you mentioned help me with my problem or it is a solution for other issues?

    Some of it will help, but i haven’t fixed that particulare issue yet, but it is planed and i will post the solution here like the rest.

    Maxminzer, i think this one will probably help you.

    Usernames are not beeing cleaned before being looked up in phpBB, to fix this open auth_wpbb.php and change:
    WHERE username_clean = '" . $db->sql_escape($username) . "'";
    to
    WHERE username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'";

    AJenbo,
    i only have this code in auth_wpbb.php:
    WHERE username = '" . $db->sql_escape($username) . "'";

    Do you mean to change this line to
    WHERE username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'";
    ?
    And thank you very much for your help!

    Ok, that seams like it is either a backwareds fix for the issue or an older version then what i have. The fix is safe to apply any way, it should improve you situation.

    Besides the fix to includes/functions_user.php and includes/acp/acp_users.php you alls need to make this correction or the users won’t be able to change there passwords.

    in ucp/ucp_profile.php change
    array('email')),
    to
    array('email_phpbb')),

    getUserByName() also failes to clear the user name, maxminzer, this is also for you.

    In module.phpbb.php change:
    FROM ' . USERS_TABLE . " WHERE username = '" . $name . "'";
    to
    FROM ' . USERS_TABLE . " WHERE username_clean = '" .utf8_clean_string($name) . "'";

    Same goes for changePassword, so change:
    $sql = 'UPDATE ' . USERS_TABLE . ' SET user_password="'.$hashed.'",user_pass_convert=0,user_last_search=1 WHERE username = "' . $username . '"';
    to
    $sql = 'UPDATE ' . USERS_TABLE . ' SET user_password="'.$hashed.'",user_pass_convert=0,user_last_search=1 WHERE username_clean = "' . utf8_clean_string($username) . '"';

    Thank you very much!
    I believe it works and solved parts of my problem.

    The only main issue I have is this:
    I create a user on wp side – if they first login on wp side on the website (i use WP-Members Plugin and it’s form) then when they go to the forum on phpbb side they are either automatically logged in or can login using WP user info.
    However, if that BRAND NEW user (who just registered) goes straight to the forum (without logging in on WP side first) and tries to login -> they can’t. They have to login on WP side at least once in order to login to forum now.
    Same goes for old users that registered before I created PHPBB forum – what I have them do in order not to register again is go and login on WP side first (just once).

    To summarize what I have right now:
    -> users that register on PHPBB side have no problem on both sides;
    -> users that register on WP side have to login on WP side once to be able to login to PHPBB forum (I was just testing this option – of course I don’t have that second option right now to make it easier for users; I’m looking forward to having that option though)

    And I still have to delete user (I was testing) on each side wp and phpbb separately but that’s ok – I won’t be doing this a lot in the future with the group I have.

    I hope plugin solutions will be available sometime.
    Thank you very much for your help, Ajenbo!

    Grate ??
    I probably won’t have time to look in to the problem with having to log in to WP first, but i have an idea for what needs to be changed to fix it (pretty big).

    As for deleting users, i might look in to this in about a month. Thanks for reporting back on the fix.

    No, thank you for all your work!

    return get_profile('id', $user);
    to
    return (int) get_user_id_from_string($user);

    After making this change I wasn’t able to login to wordpress dashboard as admin. It was giving me an error message.
    That happened after I logged out.

    Changed it back to return get_profile('id', $user); in order to login

    Hmm what version of WP are you using?

    3.0.4

Viewing 15 replies - 46 through 60 (of 61 total)
  • The topic ‘[Plugin: PHPBB Single Sign On] Can’t Auth Mode – Option Selected Doesn’t Save’ is closed to new replies.