Why were some WP users not migrated to PHPBB?

benw
User w
User w
Posts: 8
Joined: Thu Feb 24, 2022 3:34 pm

Why were some WP users not migrated to PHPBB?

Post by benw »

There are several users that were not migrated. Why would this be?

Most of them have similar email addresses such as @163.com, @mail.ru, @gmx.com
However, some more ordinary names/emails were also not added.

Thanks

User avatar
axew3
w3all User
w3all User
Posts: 2497
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Why were some WP users not migrated to PHPBB?

Post by axew3 »

Migrated from phpBB to Wp?
In this case may due to usernames that contains not allowed chars into wordpress?

benw
User w
User w
Posts: 8
Joined: Thu Feb 24, 2022 3:34 pm

Re: Why were some WP users not migrated to PHPBB?

Post by benw »

No I mean when migrated from WordPress into phpBB.

What is the criteria? Do the user details need to conform to the phpBB settings? For example, if the phpBB setting for minimum length of username is 5, then are WordPress users only migrated if the user_login has 5 or more characters? Or does the plugin insert the users into the database directly?

A few WordPress users do not have an email set - and the plugin did not migrate them to phpBB. I can understand that.

Thanks,

User avatar
axew3
w3all User
w3all User
Posts: 2497
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Why were some WP users not migrated to PHPBB?

Post by axew3 »

mh strange that are not added: yes they are added directly into db, no check is done about username length because it is assumed that if an username is too long, then the insert query should stop with an error. How phpBB is configured after about this, do not matter
If there are mismatching usernames/email also usernames are skipped and a warn should display for each, so that you can may adjust those with email problems (even if the integration run by email in effect, and users may can have mismatching username/email if the WP phpBB extension has been installed into phpBB)

benw
User w
User w
Posts: 8
Joined: Thu Feb 24, 2022 3:34 pm

Re: Why were some WP users not migrated to PHPBB?

Post by benw »

axew3 wrote:
Wed Mar 30, 2022 4:03 pm
If there are mismatching usernames/email also usernames are skipped and a warn should display for each, so that you can may adjust those with email problems (even if the integration run by email in effect, and users may can have mismatching username/email if the WP phpBB extension has been installed into phpBB)
Wait, are you saying that the username needs to be the same as the email address before migrating from WordPress to phpBB?

Many of the existing WordPress users have their email address as their username but I would prefer to use the WordPress "display_name". That would be a cool option your plugin could add - allow the selection of which field (user_login, user_email, or display_name) to use as the phpBB username when migrating.

Anyway, when I update the production website, I was planning to update the users in the WordPress database by altering the user_login to be the display_name, before migrating them to phpBB. That should work, right?

User avatar
axew3
w3all User
w3all User
Posts: 2497
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Why were some WP users not migrated to PHPBB?

Post by axew3 »

not required, because if mismatching, the script should inform you about problems, if an user is not transferred for example because a same username found, or email.
You can adjust these users email to match the same in phpBB, using the WP w3all tasks (also under tools menu)
The script has not been checked by long long time, may let know if something you note still seem not working as expected.
You can repeat the transfer process and check?

benw
User w
User w
Posts: 8
Joined: Thu Feb 24, 2022 3:34 pm

Re: Why were some WP users not migrated to PHPBB?

Post by benw »

After migration, do you remember which field your plugin uses to synchronise the users between WP and phpBB ?

Is it only the username, or the email, or both?

After migrating a user from WP, it might be a good idea to store the phpBB user ID in the WP usermeta table (if the plugin doesn't already do that).

User avatar
axew3
w3all User
w3all User
Posts: 2497
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Why were some WP users not migrated to PHPBB?

Post by axew3 »

it actually check by email when updating, while check for username and email when user register, and if one found the same (even if in wp they do not exists) the registration will be refused, because a query check both for username or email matches in phpBB.

Yes can be a good idea to store phpBB ids into usermeta, by the way since ids will never match, the email is the faster that you can use?
Since the main query, on function verify_phpbb_credentials(){
file /class.wp.w3all-phpbb.php
get user's data by cookie session, so used to check for
if user do not exist in wp, add within
if the user is not logged, login within
if the user need to be updated, update within

unique use of the ID would be when users update profile or login. I assume it would be not so useful, but may i am wrong in some case, i will focus if you have some though about. Email is very fast since it is index, both into phpBB and WP user's DB tables

Post Reply