diff --git a/fboauth.install b/fboauth.install
index 3043847..5e9d58f 100644
--- a/fboauth.install
+++ b/fboauth.install
@@ -27,6 +27,7 @@ function fboauth_uninstall() {
   variable_del('fboauth_user_properties');
   variable_del('fboauth_user_connections');
   variable_del('fboauth_user_fields');
+  variable_del('fboauth_auto_create_account');
 }
 
 /**
diff --git a/fboauth.module b/fboauth.module
index e6a7c4f..0d1fd0b 100644
--- a/fboauth.module
+++ b/fboauth.module
@@ -89,6 +89,11 @@ function fboauth_user_insert(&$edit, &$account, $category) {
   if (isset($edit['fboauth_fbid'])) {
     fboauth_save($account->uid, $edit['fboauth_fbid']);
   }
+
+  // Unset the session variable if we used it to create the new user.
+  if (isset($_SESSION['fboauth_fbuser'])) {
+    unset($_SESSION['fboauth_fbuser']);
+  }
 }
 
 /**
@@ -436,3 +441,75 @@ function theme_fboauth_user_form_connect($variables) {
   }
   return $output;
 }
+
+/**
+* Modifies the user register form to populate the fields with data retrieved from
+* Facebook after the user has authenticated with Facebook during attempted registration.
+* Implements hook_form_alter().
+*/
+function fboauth_form_user_register_form_alter(&$form, &$form_state) {
+  global $user;
+
+  // Don't change the register form if users are being automatically created.
+  if (variable_get('fboauth_auto_create_account', 1)) {
+    return;
+  }
+
+  // Don't modify the form for admins attempting to add users.
+  if ($user->uid) {
+    return;
+  }
+
+  // Don't modify the form if the fbuser isn't found.
+  if (!isset($_SESSION['fboauth_fbuser'])) {
+    return;
+  }
+
+  $fbuser = $_SESSION['fboauth_fbuser'];
+
+  // Load additional data for fields from the Profile module if it's enabled.
+  if (module_exists('profile')) {
+    module_load_include('inc', 'fboauth', 'includes/fboauth.profile');
+    $form = _fboauth_profile_set_user_register_fields($form, $form_state, $fbuser);
+  }
+
+  // Load additional data for fields from the user fields.
+  module_load_include('inc', 'fboauth', 'includes/fboauth.field');
+  $form = _fboauth_field_set_user_register_fields($form, $form_state, $fbuser);
+
+  // Set username and email separately.
+  if (variable_get('fboauth_user_username', 'username') == 'username' && !empty($fbuser->username)) {
+    $form['account']['name']['#default_value'] = $fbuser->username;
+  }
+  else {
+    $form['account']['name']['#default_value'] = $fbuser->name;
+  }
+  if (variable_get('fboauth_user_email', TRUE)) {
+    // Only set email if we are instructed to do so.
+    $form['account']['mail']['#value'] = $fbuser->email;
+    $form['account']['mail']['#type'] = 'hidden';
+  }
+
+  // Pass in the FBID as a hidden value so fboauth_user_insert() can associate
+  // the Facebook ID with the Drupal user.
+  $form['fboauth_fbid'] = array(
+    '#type' => 'value',
+    '#value' => $fbuser->id,
+  );
+}
+
+/**
+ * Implements hook_module_implements_alter().
+ *
+ * Make sure that fboauth's user register form alter hook fires after the
+ * Profile module form alter hook so that the form elements we need are created
+ * (and can thus have their #default_values adjusted).
+ */
+function fboauth_module_implements_alter(&$implementations, $hook) {
+  // TODO: Ensure this will work properly, might need to manually change the weight.
+  if ($hook === "form_alter") {
+    $temp = $implementations['fboauth'];
+    unset($implementations['fboauth']);
+    $implementations['fboauth'] = $temp;
+  }
+}
diff --git a/includes/fboauth.fboauth.inc b/includes/fboauth.fboauth.inc
index 6cb2a72..b21f329 100644
--- a/includes/fboauth.fboauth.inc
+++ b/includes/fboauth.fboauth.inc
@@ -96,6 +96,13 @@ function fboauth_action_connect($app_id, $access_token) {
     }
     // Register a new user only if allowed.
     elseif (variable_get('user_register', 1)) {
+      // If accounts aren't automatically created, then save the fbuser to the
+      // session and go to the user registration page.
+      if (!variable_get('fboauth_auto_create_account', 1)) {
+        $_SESSION['fboauth_fbuser'] = $fbuser;
+        drupal_goto('user/register');
+      }
+
       $account = fboauth_create_user($fbuser);
       // Load the account fresh just to have a fully-loaded object.
       $account = user_load($account->uid);
diff --git a/includes/fboauth.field.inc b/includes/fboauth.field.inc
index faae994..9245b8d 100644
--- a/includes/fboauth.field.inc
+++ b/includes/fboauth.field.inc
@@ -66,22 +66,30 @@ function fboauth_field_form_submit(&$form, &$form_state) {
  * Add field info to a Drupal user array (before account creation).
  */
 function fboauth_field_create_user(&$edit, $fbuser) {
-  $field_map = variable_get('fboauth_user_fields', array());
-  $field_convert_info = fboauth_field_convert_info();
   $instances = field_info_instances('user', 'user');
   foreach ($instances as $field_name => $instance) {
-    $field = field_info_field($instance['field_name']);
-    if (isset($field_map[$field_name]) && isset($field_convert_info[$field['type']]['callback'])) {
-      $callback = $field_convert_info[$field['type']]['callback'];
-      $facebook_property_name = $field_map[$field_name];
-      if ($value = $callback($facebook_property_name, $fbuser, $field, $instance)) {
-        $edit[$field_name][LANGUAGE_NONE][0] = $value;
-      }
+    if ($value = fboauth_field_convert_data($instance['field_name'], $fbuser)) {
+      $edit[$field_name][LANGUAGE_NONE][0] = $value;
     }
   }
 }
 
 /**
+ * Given a field name and a Facebook value, provide a usable Drupal value.
+ */
+function fboauth_field_convert_data($field_name, $fbuser) {
+  $field_map = variable_get('fboauth_user_fields', array());
+  $field = field_info_field($field_name);
+  $field_convert_info = fboauth_field_convert_info();
+  if (isset($field_map[$field_name]) && isset($field_convert_info[$field['type']]['callback'])) {
+    $callback = $field_convert_info[$field['type']]['callback'];
+    $facebook_property_name = $field_map[$field_name];
+    $instance = field_info_instance('user', $field_name, 'user');
+    return $callback($facebook_property_name, $fbuser, $field, $instance);
+  }
+}
+
+/**
  * Provide a callback map for converting Facebook data to fields.
  */
 function fboauth_field_convert_info() {
@@ -203,3 +211,33 @@ function fboauth_field_convert_date($facebook_property_name, $fbuser, $field, $i
   }
   return $value;
 }
+
+/**
+ * Recursively traverses a Drupal form array (specified by $form), searching for
+ * any field specified in $profile_field_values, and sets the default_value for
+ * every one it finds.
+ * @param $form
+ *   The current form array that is being recursed through (either the entire
+ *   form or some part of it).
+ * @param $form_state
+ *   The form state for the user registration form.
+ * @param $fbuser
+ *   The Facebook user object, as provided by Facebook.
+ * @return
+ *   The $element that was passed in, with modified #default_values.
+ */
+function _fboauth_field_set_user_register_fields($element, $form_state, $fbuser) {
+  // If we're already on a form element, populate its value.
+  if (isset($element['#field_name']) && isset($element['#delta']) && $element['#delta'] == 0) {
+    if ($value = fboauth_field_convert_data($element['#field_name'], $fbuser)) {
+      $element['#default_value'] = $value['value'];
+    }
+  }
+  // Recurse into children.
+  foreach (element_children($element) as $key) {
+    $element[$key] = _fboauth_field_set_user_register_fields($element[$key], $form_state, $fbuser);
+  }
+
+  return $element;
+}
+
diff --git a/includes/fboauth.pages.inc b/includes/fboauth.pages.inc
index dc37e44..2f74d9c 100644
--- a/includes/fboauth.pages.inc
+++ b/includes/fboauth.pages.inc
@@ -28,6 +28,30 @@ function fboauth_settings_form($form, &$form_state) {
     '#default_value' => variable_get('fboauth_secret', ''),
   );
 
+  $form['accounts'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Account creation'),
+  );
+
+  $registration_mode = variable_get('user_register', USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL);
+  $normal_registration = $registration_mode == USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL || $registration_mode == USER_REGISTER_VISITORS;
+  $form['accounts']['fboauth_auto_create_account'] = array(
+    '#type' => 'radios',
+    '#title' => t('Registration method'),
+    '#options' => array(
+      1 => t('Immediately create new accounts and login'),
+      0 => t('Populate normal registration form'),
+    ),
+    '#description' => t('When logging in through Facebook, a new user account can be created automatically using Facebook profile information, or the normal registration form can be prepopulated. If the second option is used, an account will not be created until the user completes the registration form.'),
+    '#default_value' => variable_get('fboauth_auto_create_account', 1),
+    '#disabled' => !$normal_registration,
+  );
+  if (!$normal_registration) {
+    $form['fboauth_auto_create_account']['#default_value'] = 1;
+    $form['fboauth_auto_create_account']['#disabled'] = TRUE;
+    $form['fboauth_auto_create_account']['#description'] .= ' <strong>' . t('This option is disabled because users are not allowed to register their own accounts.') . '</strong> ' . t('<a href="!settings">Allow visitors to create accounts</a> if you want to prepopulate the registration form.', array('!settings' => url('admin/config/people/accounts')));
+  }
+
   $form['fboauth_basic_mapping'] = array(
     '#type' => 'fieldset',
     '#title' => t('Basic mapping'),
@@ -142,6 +166,8 @@ function fboauth_settings_form_submit($form, &$form_state) {
   variable_set('fboauth_id', $form_state['values']['fboauth_id']);
   variable_set('fboauth_secret', $form_state['values']['fboauth_secret']);
 
+  variable_set('fboauth_auto_create_account', $form_state['values']['fboauth_auto_create_account']);
+
   variable_set('fboauth_user_email', $form_state['values']['fboauth_user_email']);
   variable_set('fboauth_user_username', $form_state['values']['fboauth_user_username']);
   variable_set('fboauth_user_picture', $form_state['values']['fboauth_user_picture']);
diff --git a/includes/fboauth.profile.inc b/includes/fboauth.profile.inc
index 601fd64..36a3093 100644
--- a/includes/fboauth.profile.inc
+++ b/includes/fboauth.profile.inc
@@ -145,3 +145,37 @@ function fboauth_profile_create_user(&$edit, $fbuser) {
     }
   }
 }
+
+/**
+ * Recursively traverses a Drupal form array (specified by $form), searching for
+ * any field specified in $profile_field_values, and sets the default_value for
+ * every one it finds.
+ * @param $form
+ *   The current form array that is being recursed through (either the entire
+ *   form or some part of it).
+ * @param $form_state
+ *   The form state for the user registration form.
+ * @param $fbuser
+ *   The Facebook user object, as provided by Facebook.
+ * @return
+ *   The $element that was passed in, with modified #default_values.
+*/
+function _fboauth_profile_set_user_register_fields($element, $form_state, $fbuser, $key = NULL) {
+  static $values;
+  if (!isset($values)) {
+    $values = array();
+    fboauth_profile_create_user($values, $fbuser);
+  }
+
+  // If we're already on a form element, populate its value.
+  if (isset($key) && isset($values[$key])) {
+    $element['#default_value'] = $values[$key];
+  }
+
+  // Recurse into children.
+  foreach (element_children($element) as $key) {
+    $element[$key] = _fboauth_profile_set_user_register_fields($element[$key], $form_state, $fbuser, $key);
+  }
+
+  return $element;
+}
\ No newline at end of file
