PHPBB W3ALL Transfer does not transfer usernames on Cyrillic

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

Re: PHPBB W3ALL Transfer does not transfer usernames on Cyrillic

Post by axew3 »

Are you ready to test the transfer of some user into WP with Cyrillic usernames? (obviously so any other language can be added in same way)
Can you after return back with the report about how things goes, into a WP Cyrillic, using so these users to login, update password then re-login etc. using the integration plugin, or you just want the code to transfer users but not integrating?
Have you anyway minutes of time to test it or the possibility to do so and report?

The code has been really improved under any aspect, reduced to the essential and the right way.
madnnes
User ww
User ww
Posts: 20
Joined: Tue Sep 26, 2023 8:39 am

Re: PHPBB W3ALL Transfer does not transfer usernames on Cyrillic

Post by madnnes »

Hey,
Sorry for my late reply!

I don't know if I can test properly, because I only use the "Transfer single phpBB User into WordPress" option and not the phpbb3 itself.
But maybe you can send me the code and some instructions how to implement it and I can test.
User avatar
axew3
w3all User
w3all User
Posts: 2862
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: PHPBB W3ALL Transfer does not transfer usernames on Cyrillic

Post by axew3 »

No worry, i tested it any way, and it is ready.
You should substitute
into the plugin /admin/ folder
the file wp_w3all_users_to_wp.php
with this one:
wp_w3all_users_to_wp.zip
(4.24 KiB) Downloaded 25 times
then into the /common/ folder add the follow file:
helpers.zip
(746 Bytes) Downloaded 25 times
Users are now transferred in cyrillic, if the username into phpBB is in cyrillc.
The plugin code will allow with few easy modifications, to transfer users in any native language (i did it for this, even if actually it is still just for cyrillic).
2.9.0 will add users in cyrillic (or any other language) onlogin and when on verify_credential (logged in user in phpBB added on fly into WP because present a valid phpBB session cookie).

Probably the code will use the included function on the helpers.php file that translate the cyrillic based on the alphabet and that i've found in internet, and not the native Php (depend if it is active or not into your php.ini) transliterator_transliterate() function. Let know if the alphabet is correct
and all works as expected!
madnnes
User ww
User ww
Posts: 20
Joined: Tue Sep 26, 2023 8:39 am

Re: PHPBB W3ALL Transfer does not transfer usernames on Cyrillic

Post by madnnes »

Hey,

Thanks a lot! It's working now :)

All my cyrillic usernames are properly transferred now.
User avatar
axew3
w3all User
w3all User
Posts: 2862
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: PHPBB W3ALL Transfer does not transfer usernames on Cyrillic

Post by axew3 »

Hello, i am testing all added new features and fixes, any way and i note this into a default WP, about usernames added in native alphabet,
so if the user is transferred and added in Cyrillic alphabet in WP.
When the user go to update the email into his profile, the change email is sent, but the WordPress return error
Cannot create a user with an empty login name.
It seem that the wp_insert_user some way is fired along the user update, and i suspect that it happen because the passed user_login to the WP update profile function, test for the username if it exists or not, and seem to not recognize that the passed Cyrillic username exist, then try to create the user. Not reversed and i do not exactly know.
Then after that anyway the change email, email, is sent, when i go to click into the link to confirm the email change, the wordpress profile message say that the email successfully changed, but instead it reset to the old one.
And i cannot login into wordpress using the user_login/username, but only using the email.


If i set WordPress in Cyrillic, when i go to change the email, i get the same
Нельзя создать пользователя с пустым логином.
that i assume without translating it that mean
Cannot create a user with an empty login name.
And even if the confirmation email is sent, when i click the confirmation email, the email is not updated at all.

This happen by default in WP, it has been tested that is not due to the integration plugin that it happen.
How do you manage this thing?
User avatar
axew3
w3all User
w3all User
Posts: 2862
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: PHPBB W3ALL Transfer does not transfer usernames on Cyrillic

Post by axew3 »

I am a little confused on how this thing should be managed.
I see this morning, giving to the code some minutes of tests, that even setting as Russian the language into WP, when i go to register a name in Cyrillic like let say нужно починить, that translated into Latin chars is needs to be fixed (a strange test username ok, but legit), WordPress answer the follow:
Ошибка: Это имя пользователя некорректно, поскольку оно содержит недопустимые символы. Пожалуйста, введите корректное имя пользователя.
so
Error: This username is invalid because it contains invalid characters. Please enter a valid username.
Why this happen and how so, if a login done by user_login/username will not work (work of course by email instead) and WP do not recognize the username passed as Cyrillic even if the wp is set as Russian, and the email is not updated as observed and described above,
then my question is: the code of the integration plugin, should transliterate all usernames as Latin and store usernames in Latin?
Post Reply