Question about uid
moofang - July 21, 2008 - 06:25
Hi,
I am intending log user actions in a module I'm developing, and am considering logging the user's uid as an identifier for the user in question. However, I am concerned about the possibility of the following scenario : if user A has uid 1, and at some point user A was deleted, is it possible for another user say B to have a uid 1 later on (and thus result in ambiguity)?
Thanks in advance.

(IIRC) Nope, unless you
(IIRC) Nope, unless you fiddle with the DB, there's an incrementing number in some counter table.
UIDs
User ids can't be reassign. Once a user has been deleted, the user id he/she possessed is vanished for ever, unless as you write your own code. Letting Drupal do the dirty work is more secure, however.
Beautifulmind
Know more
user id's are issued from
user id's are issued from the users table
the uid column is an auto_increment column.
The only way it would be reused is if you reset the auto_increment value
So your users should never be issued an historical users uid.
That is good to hear. Thanks
That is good to hear. Thanks alot guys :)