I'm not sure about its terminology, but for http://www.somedomain.com/user/123456
, the "custom user ID" I'm referring to is 123456
. I have seen this on quite a lot of websites, in fact, even SO uses something similar. What I'm curious about is:
What are they ? - I guess they can't be the real,
auto_increment
ed user ID from the database since it's always the same length and even if they would be padded, users that are supposed to have registered when the website was launched don't have low values like000001
for example.By the way, is there any naming convention for this kind of ID ?
Why/when use them ? - What are the advantages in using such an ID as opposed to the actual database user ID, and when should they be used ?
Also, why do some sites (like SO, for example) use them in combination with the username ?
What are good methods of generating them ? - Pretty self-explanatory I suppose, I'm interested in seeing what methods are you guys using.
Although I don't think the question is language-specific, and the language used wouldn't have too much influence on the answers, for the sake of the argument, suppose it's PHP and MySQL, but any examples are welcome.
Thanks in advance !