Jump to content

Download: Fix lower-case names in other languages


Recommended Posts

File Name: Fix lower-case names in other languages
File Submitter: bfarber
File Submitted: 08 Feb 2007
File Category: IPB 2.2.x / 2.3.x Tools

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

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.

Click here to download this file

UPDATE ibf_members SET members_l_username=LOWER(name), members_l_display_name=LOWER(members_display_name);
Link to comment


This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...