Twitter (as most web services) does not care about the case of the username, this can give problems since the twitter_get_user_accounts() function uses that username (screen_name) to perform a join between twitter_account and twitter_user tables.
The solution is simple and it just needs to change the query in twitter_get_user_accounts() to do the comparison with all lowercase, like:
$sql = "SELECT ta.*, tu.uid, tu.password, tu.import FROM {twitter_user} tu LEFT JOIN {twitter_account} ta ON (LOWER(tu.screen_name) = LOWER(ta.screen_name)) WHERE tu.uid = %d";
Iván
Comments
Comment #1
eaton commentedI'll take a look -- I'd much prefer to simply lowercase the username whenever it's inserted into the database so it's consistent -- using LOWER() in queries can really kill performance, is it makes the use of indexes impossible.
Comment #2
webchick#349639: Twitter screen names are case sensitive is newer, but has a patch. Marking this as a duplicate.