diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentPreviewTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentPreviewTest.php index e1fd5f8..c619f43 100644 --- a/core/modules/comment/lib/Drupal/comment/Tests/CommentPreviewTest.php +++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentPreviewTest.php @@ -41,7 +41,7 @@ class CommentPreviewTest extends CommentTestBase { $edit['signature[value]'] = '' . $test_signature. ''; $edit['signature[format]'] = 'filtered_html'; $image = current($this->drupalGetTestFiles('image')); - $edit['files[field_user_picture_und_0]'] = drupal_realpath($image->uri); + $edit['files[user_picture_und_0]'] = drupal_realpath($image->uri); $this->drupalPost('user/' . $this->web_user->uid . '/edit', $edit, t('Save')); // As the web user, fill in the comment form and preview the comment. diff --git a/core/modules/user/lib/Drupal/user/Tests/UserPictureTest.php b/core/modules/user/lib/Drupal/user/Tests/UserPictureTest.php index 2793bc6..dce260b 100644 --- a/core/modules/user/lib/Drupal/user/Tests/UserPictureTest.php +++ b/core/modules/user/lib/Drupal/user/Tests/UserPictureTest.php @@ -117,11 +117,11 @@ class UserPictureTest extends WebTestBase { * Edits the user picture for the test user. */ function saveUserPicture($image) { - $edit = array('files[field_user_picture_und_0]' => drupal_realpath($image->uri)); + $edit = array('files[user_picture_und_0]' => drupal_realpath($image->uri)); $this->drupalPost('user/' . $this->web_user->uid . '/edit', $edit, t('Save')); // Load actual user data from database. $account = user_load($this->web_user->uid, TRUE); - return file_load($account->field_user_picture[LANGUAGE_NOT_SPECIFIED][0]['fid']); + return file_load($account->user_picture[LANGUAGE_NOT_SPECIFIED][0]['fid']); } } diff --git a/core/modules/user/user.install b/core/modules/user/user.install index 6ef8898..aaff3c3 100644 --- a/core/modules/user/user.install +++ b/core/modules/user/user.install @@ -430,7 +430,7 @@ function user_update_8002() { } /** - * Migrate {users}.picture to 'field_user_picture' image field. + * Migrate {users}.picture to 'user_picture' image field. */ function user_update_8003(&$sandbox) { // User pictures can only be migrated to the new user picture image field @@ -446,9 +446,9 @@ function user_update_8003(&$sandbox) { $sandbox['total'] = (int) db_query('SELECT COUNT(picture) FROM {users} WHERE picture > 0')->fetchField(); $sandbox['processed'] = 0; - $fields = _update_7000_field_read_fields(array('field_name' => 'field_user_picture'), 'field_name'); - $field = $fields['field_user_picture']; - $sandbox['field_user_picture_table'] = _field_sql_storage_tablename($field); + $fields = _update_7000_field_read_fields(array('field_name' => 'user_picture'), 'field_name'); + $field = $fields['user_picture']; + $sandbox['user_picture_table'] = _field_sql_storage_tablename($field); } if ($sandbox['total']) { @@ -457,7 +457,7 @@ function user_update_8003(&$sandbox) { foreach ($results as $uid => $fid) { // Inject the field value and save the user account, so the picture // file usage is claimed. - db_insert($sandbox['field_user_picture_table']) + db_insert($sandbox['user_picture_table']) ->fields(array( 'entity_type' => 'user', 'bundle' => 'user', @@ -465,7 +465,7 @@ function user_update_8003(&$sandbox) { 'revision_id' => $uid, 'langcode' => LANGUAGE_NOT_SPECIFIED, 'delta' => 0, - 'field_user_picture_fid' => $fid, + 'user_picture_fid' => $fid, )) ->execute(); // Remove file usage. @@ -487,7 +487,7 @@ function user_update_8003(&$sandbox) { } /** - * @} End of "addtogroup updates-7.x-to-8.x" + * @} End of "addtogroup updates-7.x-to-8.x". */ /** @@ -506,7 +506,7 @@ function _user_install_picture_field(array $settings = array()) { ); $field = array( - 'field_name' => 'field_user_picture', + 'field_name' => 'user_picture', 'module' => 'image', 'type' => 'image', 'cardinality' => 1, @@ -524,7 +524,7 @@ function _user_install_picture_field(array $settings = array()) { _update_7000_field_create_field($field); $instance = array( - 'field_name' => 'field_user_picture', + 'field_name' => 'user_picture', 'entity_type' => 'user', 'label' => 'Picture', 'bundle' => 'user', diff --git a/core/modules/user/user.module b/core/modules/user/user.module index fd166cc..89c8070 100644 --- a/core/modules/user/user.module +++ b/core/modules/user/user.module @@ -233,7 +233,7 @@ function user_attach_accounts(array $entities) { * preprocess stage. */ function user_picture_enabled() { - return (bool) field_info_instance('user', 'field_user_picture', 'user'); + return (bool) field_info_instance('user', 'user_picture', 'user'); } /**