Warning: Non-US characters in user name (General)

by danielb987, Thursday, May 04, 2017, 06:06 (2776 days ago) @ Auge

Very good. But I think that the SQL query that changes the user_name field to utf8_bin should be run before the duplicate test. By doing that, Daniel and Däniel would be different usernames.

Second, the user_name field needs to have a UNIQUE index. Even if the user_name field is utf8_bin, there may still be duplicates. For example if someone is manually editing the database and messing things up. So we need to protect the user_name field from duplicates in the database by a UNIQUE index.

If we find duplicates, we should show a list of all the duplicates and a link to the administrator control panel to edit the user name:
http://www.example.com/forum/index.php?mode=admin&edit_user=18

This list should show the user id, user name and email address, since the user id is the only thing that is guaranteed unique and the email address is usefull if the administrator wants to contact the user. In order to do this, we need to do a second SQL query for each duplicate user name.

Best regards,
Daniel


Complete thread:

 RSS Feed of thread