Index: modules/contact/contact.js =================================================================== RCS file: /cvs/drupal/drupal/modules/contact/contact.js,v retrieving revision 1.1 diff -u -p -r1.1 contact.js --- modules/contact/contact.js 9 Oct 2009 15:39:12 -0000 1.1 +++ modules/contact/contact.js 9 Oct 2009 16:07:42 -0000 @@ -4,7 +4,7 @@ Drupal.behaviors.contact = { attach: function(context) { $.each(['name', 'mail'], function () { - var cookie = $.cookie('Drupal.user.' + this); + var cookie = $.cookie('Drupal.visitor.' + this); if (cookie) { $('#contact-site-form input[name=' + this + ']', context).once('comment').val(cookie); } Index: modules/user/user.js =================================================================== RCS file: /cvs/drupal/drupal/modules/user/user.js,v retrieving revision 1.18 diff -u -p -r1.18 user.js --- modules/user/user.js 21 Sep 2009 08:52:41 -0000 1.18 +++ modules/user/user.js 9 Oct 2009 16:07:42 -0000 @@ -188,4 +188,15 @@ Drupal.behaviors.userSettings = { } }; +Drupal.behaviors.registration = { + attach: function(context) { + $.each(['name', 'mail'], function () { + var cookie = $.cookie('Drupal.visitor.' + this); + if (cookie) { + $('#user-register input[name=' + this + ']', context).once('comment').val(cookie); + } + }); + } +}; + })(jQuery); Index: modules/user/user.module =================================================================== RCS file: /cvs/drupal/drupal/modules/user/user.module,v retrieving revision 1.1059 diff -u -p -r1.1059 user.module --- modules/user/user.module 9 Oct 2009 15:39:12 -0000 1.1059 +++ modules/user/user.module 9 Oct 2009 16:07:43 -0000 @@ -3164,6 +3164,9 @@ function user_register($form, &$form_sta $form['account']['#type'] = 'markup'; } + $form['#attached']['library'][] = array('system', 'cookie'); + $form['#attached']['js'][] = drupal_get_path('module', 'user') . '/user.js'; + $form['submit'] = array('#type' => 'submit', '#value' => t('Create new account'), '#weight' => 30); $form['#validate'][] = 'user_register_validate';