PDA

View Full Version : AdminCP issues search for certain usernames


pattycake
12-28-2013, 03:27 PM
In AdminCP, I am noticing that it has issues and cannot find usernames with special characters in them.

For instance, username: '07 EXC (it has a single quote at the beginning)

When searching for that username, exact match or otherwise, AdminCP says it cannot be found. But when I search by the persons email, it finds it.

pattycake
12-31-2013, 03:07 AM
I found another... username: "GS eh!" (without the quotes)

AdminCP cannot find him, but if I search by his email address, he gets found.

If I search by username = GS EH (without the !), he gets found.... it's the ! at the end that is causing the problem

The REAL problem, is that he cannot login.

pattycake
01-08-2014, 12:40 AM
update - I found the problem... when I converted my usernames to vbulletin, the usernames in my previous table
had things like "& #39;" for a single quote.

Meaning that it was STORED as "Jim& #39;s Son" in the database when it should have been Jim's Son.

In the post just before this one, the user's name was stored in the database as GS eh& #33; and in reality, it was actaully GS eh!

When I imported into vbulletin, I did not convert the values - once I did a mass update to correct the usernames, all was well.

ticket closed :)

Max Taxable
01-08-2014, 12:49 AM
Sorry i missed this thread, i would have helped. Glad you got it sorted.

pattycake
01-08-2014, 01:04 AM
fyi: here is the sql to find those guys:
SELECT * FROM `user` WHERE username LIKE '%&#%' (those are percents at the front and back)

here are some good sql's to fix the problem
UPDATE user SET username = REPLACE(username, '& #39;', '\'')
UPDATE user SET username = REPLACE(username, '& #33;', '!')
UPDATE user SET username = REPLACE(username, '& #036;', '$')
UPDATE user SET username = REPLACE(username, '& #124;', '|')

of course, change "user" to your user table name and.... remove the space between & and #