[Plugin: PHPBB Single Sign On] Duplicate user fix
-
So I know the horrid error,
Duplicate entry 'USER' for key 'username_clean [1062]everyone sees it if they don’t enter their username right caps and all. I have a fix for it.
Go into your auth_wpbb.php file located in your phpbb folder phpBB3/includes/auth/. Open it up with your favorite editor of choice and go down to,/* * * Exists in PHPBB ? */add this just below it,
$username = strtolower($username);and change
$sql = 'SELECT user_id, username, user_password, user_passchg, user_pass_convert, user_email, user_type, user_login_attempts FROM ' . USERS_TABLE . " WHERE username = '" . $db->sql_escape($username) . "'";to
$sql = 'SELECT user_id, username, user_password, user_passchg, user_pass_convert, user_email, user_type, user_login_attempts FROM ' . USERS_TABLE . " WHERE username_clean = '" . $db->sql_escape($username) . "'";That should do it, now this will only work as long as you already had it logging you in with the correct username and that you could login on the WP side and be logged in on the phpBB side.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘[Plugin: PHPBB Single Sign On] Duplicate user fix’ is closed to new replies.