diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-09-03 14:13:58 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-09-03 14:13:58 +0000 |
commit | 6fa344f5b19fa183b822397513fa8b0cd8537f15 (patch) | |
tree | cdb67038f5b2ca06ed9639fba38034b3c0a25b70 /install.php | |
parent | a4b3217bd1760611fc3616e293542a21375bd2ff (diff) | |
download | brdo-6fa344f5b19fa183b822397513fa8b0cd8537f15.tar.gz brdo-6fa344f5b19fa183b822397513fa8b0cd8537f15.tar.bz2 |
#172265 by chx: fix user id problems on mysql, when inserting the first two special users
Diffstat (limited to 'install.php')
-rw-r--r-- | install.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/install.php b/install.php index b3e2fbcbf..63a0e146f 100644 --- a/install.php +++ b/install.php @@ -969,8 +969,13 @@ function install_configure_form_submit($form, &$form_state) { variable_set('user_email_verification', FALSE); $form_state['old_values'] = $form_state['values']; $form_state['values'] = $form_state['values']['account']; - user_register_submit($form, $form_state); - db_query("INSERT INTO {users} (uid, name, mail) VALUES(%d, '%s', '%s')", 0, '', ''); + + // We precreated user 1 with placeholder values. Let's save the real values. + $account = user_load(1); + $merge_data = array('init' => $form_state['values']['mail'], 'roles' => array(), 'status' => 1); + user_save($account, array_merge($form_state['values'], $merge_data)); + // Log in the first user. + user_authenticate($form_state['values']['name'], trim($form_state['values']['pass'])); $form_state['values'] = $form_state['old_values']; unset($form_state['old_values']); variable_set('user_email_verification', TRUE); |