In my user database table, I take the MD5 hash of the email address of a user as the id.
Example: email(example@example.org) = id(d41d8cd98f00b204e9800998ecf8427e)
email(example@example.org) = id(d41d8cd98f00b204e9800998ecf8427e)
Couldn't you just add another field that was an auto-increment int field?