Fix lower-case names in other languages > Invisionize.eu - IP.Board (IPB) News
Kanał Rss Kanał Rss
Kanał Atom Kanał Atom

Fix lower-case names in other languages

wersja drukowalna wersja Microsoft Word wersja HTML

IPB 2.2 adds two new name columns to ibf_members: members_l_username and members_l_display_name

These are lower-cased versions of ibf_members.name and ibf_members.members_display_name with the effect being that you don't have to run a LOWER() conversion via MySQL, which increases server load unnecessarily.

During the upgrade routine, to populate these columns, the following query is run

SQL
UPDATE ibf_members SET members_l_username=LOWER(name), members_l_display_name=LOWER(members_display_name);


For 99% of our users, this is fine. MySQL treats most western characters the same as php does.

However, for some user's it has been noted that MySQL and PHP do not agree on the lowercase version of certain characters. I've noticed issues on both Polish and Thai forums, for example, where upon upgrading users cannot login. The reason is PHP does a strtolower() on the username, and then compares against the members_l_username column - however MySQL populated this column with different data than PHP arrived at.

Moving forward this is not an issue, however there isn't a direct query or tool in IPB to fix this.

To correct this issue if you experience it, just upload the following tool to your root forum directory, and visit it in your browser. The script will process 500 accounts at a time, and tell you when it's complete. Afterwards, all your users should not have any problems logging in due to the name conversion differences.

pon, 20 kwiecień 2009