diff options
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); |