Index: googleanalytics.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/google_analytics/googleanalytics.module,v
retrieving revision 1.53
diff -u -r1.53 googleanalytics.module
--- googleanalytics.module	1 Oct 2010 22:24:16 -0000	1.53
+++ googleanalytics.module	1 Oct 2010 23:26:31 -0000
@@ -235,7 +235,7 @@
       '#type' => 'checkbox',
       '#title' => t('Enable user tracking'),
       '#description' => $description,
-      '#default_value' => isset($account->googleanalytics['custom']) ? $account->googleanalytics['custom'] : ($custom == 1)
+      '#default_value' => isset($account->data['googleanalytics']['custom']) ? $account->data['googleanalytics']['custom'] : ($custom == 1)
     );
 
     return $form;
@@ -243,6 +243,15 @@
 }
 
 /**
+ * Implements hook_user_presave().
+ */
+function googleanalytics_user_presave(&$edit, $account, $category) {
+  if (isset($edit['googleanalytics']['custom'])) {
+    $edit['data']['googleanalytics']['custom'] = $edit['googleanalytics']['custom'];
+  }
+}
+
+/**
  * Implementation of hook_cron().
  */
 function googleanalytics_cron() {
@@ -333,8 +342,8 @@
 
     // Use the user's block visibility setting, if necessary.
     if (($custom = variable_get('googleanalytics_custom', 0)) != 0) {
-      if ($account->uid && isset($account->googleanalytics['custom'])) {
-        $enabled = $account->googleanalytics['custom'];
+      if ($account->uid && isset($account->data['googleanalytics']['custom'])) {
+        $enabled = $account->data['googleanalytics']['custom'];
       }
       else {
         $enabled = ($custom == 1);
