Auto Increment on users table is not functioning
This is a duplicate of Create a user programmatically and give they a role

// The first parameter should be blank so a new user is created.
user_save('', $new_user);


If you want to use user_save($new_user); you can set $new_user-&gt;is_new to TRUE or omit the $account->uid field.