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)
You could use hexdec to parse the hexadecimal string and store the number in the database.