I have been using drupal for a while and when i was on 4.6, I needed to customize alot of things. Because I was stubborn, I didn't want to relearn the wheel on how drupal does forms, etc etc..so I created a custom script that we used to create users. The main reason was the lack of an obvious means of entering a custom UID for the user. We use drupal to distribute a financial newsletter and did not like the default UID being so low.( im just the dev guy, dont ask me ;) ) We created the admin account using the default 1 and 0 for anon, for subscribers we started at 102001 for the uid.

Now my problem.

I am currently porting everything over to drupal 5.1, removing all of my clunky workaround scripts. I am almost 100% complete with exception on what to do about the custom UID fiasco. I have several hundred subscribers from old site with correct UID's, but if i add a new user on the 5.1 version, it starts at the lowest available # (ex. uid = 3 ). I know thats the defaut behavior, but I want to change it.

Now my question.

Is there an easy way to code in what drupal uses as the UID when creating an account? Ideally, because users cant create their own account, we would like to just have a simple box above the username on the registration form where we can manualy insert the UID that we chose.

Thanks in advance for any clues.

Comments

Island Usurper’s picture

Sounds like someone in your company needs to realize that UIDs aren't meant to be seen, so the actual value of it shouldn't matter at all. That said, the easiest thing I can think of is to increase the value of the user_uid in the sequences table. Go ahead and crank it up to some arbitrary number, and Drupal will increment it for new users from there.

-----
Übercart -- One cart to rule them all.

Sam J Hain’s picture

Thanks alot. I never even looked at that table before now.

Beautiful indeed.