diff --git a/core/modules/block/block.module b/core/modules/block/block.module index f877411..4f63e29 100644 --- a/core/modules/block/block.module +++ b/core/modules/block/block.module @@ -599,7 +599,7 @@ function block_form_user_profile_form_alter(&$form, &$form_state) { $account = $form_state['controller']->getEntity($form_state); $rids = array_keys($account->roles); $result = db_query("SELECT DISTINCT b.* FROM {block} b LEFT JOIN {block_role} r ON b.module = r.module AND b.delta = r.delta WHERE b.status = 1 AND b.custom <> 0 AND (r.rid IN (:rids) OR r.rid IS NULL) ORDER BY b.weight, b.module", array(':rids' => $rids)); - $account_data = drupal_container()->get('user.data')->get('block', $account->uid, 'block'); + $account_data = drupal_container()->get('user.data')->get('block', $account->id(), 'block'); $blocks = array(); foreach ($result as $block) { @@ -644,7 +644,7 @@ function block_field_extra_fields() { */ function block_user_update($account) { if (isset($account->block)) { - drupal_container()->get('user.data')->set('block', $account->uid, 'block', $account->block); + drupal_container()->get('user.data')->set('block', $account->id(), 'block', $account->block); } } diff --git a/core/modules/contact/contact.module b/core/modules/contact/contact.module index cdec7e3..e2a5921 100644 --- a/core/modules/contact/contact.module +++ b/core/modules/contact/contact.module @@ -147,7 +147,7 @@ function _contact_personal_tab_access($account) { // If the requested user has disabled their contact form, do not allow users // to contact them. - $account_data = drupal_container()->get('user.data')->get('contact', $account->uid, 'enabled'); + $account_data = drupal_container()->get('user.data')->get('contact', $account->id(), 'enabled'); if (isset($account_data) && empty($account_data)) { return FALSE; } @@ -296,7 +296,7 @@ function contact_form_user_profile_form_alter(&$form, &$form_state) { '#collapsible' => TRUE, ); $account = $form_state['controller']->getEntity($form_state); - $account_data = drupal_container()->get('user.data')->get('contact', $account->uid, 'enabled'); + $account_data = drupal_container()->get('user.data')->get('contact', $account->id(), 'enabled'); $form['contact']['contact'] = array( '#type' => 'checkbox', '#title' => t('Personal contact form'), @@ -310,7 +310,7 @@ function contact_form_user_profile_form_alter(&$form, &$form_state) { */ function contact_user_update($account) { if (isset($account->contact)) { - drupal_container()->get('user.data')->set('contact', $account->uid, 'enabled', (int) $account->contact); + drupal_container()->get('user.data')->set('contact', $account->id(), 'enabled', (int) $account->contact); } } diff --git a/core/modules/overlay/overlay.module b/core/modules/overlay/overlay.module index 76d90be..8c00f8b 100644 --- a/core/modules/overlay/overlay.module +++ b/core/modules/overlay/overlay.module @@ -87,7 +87,7 @@ function overlay_theme() { function overlay_form_user_profile_form_alter(&$form, &$form_state) { $account = $form_state['controller']->getEntity($form_state); if (user_access('access overlay', $account)) { - $account_data = drupal_container()->get('user.data')->get('overlay', $account->uid, 'enabled'); + $account_data = drupal_container()->get('user.data')->get('overlay', $account->id(), 'enabled'); $form['overlay_control'] = array( '#type' => 'fieldset', '#title' => t('Administrative overlay'), @@ -104,11 +104,11 @@ function overlay_form_user_profile_form_alter(&$form, &$form_state) { } /** - * Implements hook_user_presave(). + * Implements hook_user_update(). */ -function overlay_user_presave($account) { +function overlay_user_update($account) { if (isset($account->overlay)) { - drupal_container()->get('user.data')->set('overlay', $account->uid, 'enabled', $account->overlay); + drupal_container()->get('user.data')->set('overlay', $account->id(), 'enabled', (int) $account->overlay); } } diff --git a/core/modules/user/user.views.inc b/core/modules/user/user.views.inc index 295278a..d630b00 100644 --- a/core/modules/user/user.views.inc +++ b/core/modules/user/user.views.inc @@ -335,14 +335,6 @@ function user_views_data() { ), ); - $data['users']['data'] = array( - 'title' => t('Data'), - 'help' => t('Provide serialized data of the user'), - 'field' => array( - 'id' => 'serialized', - ), - ); - // users_roles table $data['users_roles']['table']['group'] = t('User');