I've been working a while on a new website for my student society using drupal.
Because we already have a user database with passwords, usernames etc. from our old website,
we just want to quickly put these into the drupal database.
I wrote a piece of php code to quickly load this old data into the new drupal database.
The data is now in the new database, but i think some essential data is missing:
Drupal doesnt recognise the inserted users as drupal users.
I.E. if I want to add a new user to the database (using register, or the admin panel), drupal just looks up the max(uid) and then returns a uid that is already taken by a inserted user. Then it sends the email to the email-adress, you just entered while registering, and you get 2 links.
The first one says: you can log in here and here with your given username and password, but when you do drupal returns: username doesnt exist.
The other gives a one-time-link where you can alter the data you just entered. When you click that it gives all data, earlier inserted by my php-script, that is known with that already taken uid.
So if I register username: "test" with email: "email@example.com". Drupal finds uid "2" that already has data with username: "foobar" and email "firstname.lastname@example.org".
After registering it sends a confirmation email to "email@example.com" containing username:"test".
Then if I want to login using my new account username: "test", drupal can't find the username, because in the database uid "2" is still username "foobar".
If I click the one-time-link, the page says: this is a one time link for username "foobar". And then supplies al the information I entered for username "test" while registering except for the username that is still "foobar" and the emailadress that is "firstname.lastname@example.org".
The thing were it's going wrong, is that drupal finds uid "2" as the not yet registered uid. While there is already a user with uid 2. So probably drupal searches for more data then just uid, but also checks for ????
My question is:
What does it check more for, in order to decide which uid is the uid that hasnt been used yet?