An account is created for the first user with a 64bit ID that registers. But any user with a 64bit ID after that, is unable to register and is instead logged in as the first user.
I've checked fb_user, fb_user_app and they are already bigint(20)
I've looked at the tables and it seems the correct ID was not inserted for the first user that registers and instead fbu has 2147483647
I read somewhere that the query needs to be updated from %d to %s for the fbu insert so I tried changing line 811 in fb_user.module to
db_query("INSERT INTO {fb_user} (uid, fbu) VALUES (%d, %s)", $account->uid, $fbu);
With the change the correct ID was inserted but I couldn't login and everytime I refreshed a duplicate user was created.
Is anyone else having this issue? Any suggestions?
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | fb_bigint.diff | 6.36 KB | Dave Cohen |
| #2 | fb_user_bigint.diff | 1.16 KB | Dave Cohen |
Comments
Comment #1
Dave Cohen commentedWhere did you read about the %s trick?
Comment #2
Dave Cohen commentedDoes this work better?
Comment #3
Avaz Mano commentedLooks like that does work. Seems to be working great so far.
I read about the %s trick here http://drupal.org/node/560316. I will test some more. Thanks a bunch, this had me up all last night.
Comment #4
Dave Cohen commentedI'm not sure why this problem is not more widespread. Is there something about php and/or mysql configuration that makes this a non-issue for some installs?
Here's a patch that covers more database tables.
Comment #5
Dave Cohen commentedI think you just need to update your drupal core. Which version are you using?
(Marking this as fixed, not because I checked anything in. I don't plan to. I think this has been fixed in core.)
Comment #6
Avaz Mano commentedCould be I'm using Drupal 6.12. Guess I should update.
Thanks a lot for the additional patch.
Comment #7
Dave Cohen commentedWell, I don't recommend the patch, and have no plans to check it in. You should upgrade drupal.