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?

CommentFileSizeAuthor
#4 fb_bigint.diff6.36 KBDave Cohen
#2 fb_user_bigint.diff1.16 KBDave Cohen

Comments

Dave Cohen’s picture

Where did you read about the %s trick?

Dave Cohen’s picture

Status: Active » Needs review
StatusFileSize
new1.16 KB

Does this work better?

Avaz Mano’s picture

Looks 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.

Dave Cohen’s picture

StatusFileSize
new6.36 KB

I'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.

Dave Cohen’s picture

Status: Needs review » Fixed

I 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.)

Avaz Mano’s picture

Could be I'm using Drupal 6.12. Guess I should update.

Thanks a lot for the additional patch.

Dave Cohen’s picture

Category: bug » support

Well, I don't recommend the patch, and have no plans to check it in. You should upgrade drupal.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.