From b446b4299c922cab631586ec2c49c3387c46548e Mon Sep 17 00:00:00 2001 From: webchick Date: Fri, 3 Jan 2014 00:09:03 -0800 Subject: [PATCH] Issue #2164715 by Berdir: Remove user_node_load(). --- core/modules/user/user.module | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/core/modules/user/user.module b/core/modules/user/user.module index b5604a1de369..f6a30cbde5da 100644 --- a/core/modules/user/user.module +++ b/core/modules/user/user.module @@ -1749,29 +1749,6 @@ function user_form_process_password_confirm($element) { return $element; } -/** - * Implements hook_node_load(). - * - * @todo Deprecated by $node->author, attached in - * \Drupal\node\NodeViewBuilder::buildContent(). Update code that - * depends on these properties. - */ -function user_node_load($nodes) { - // Build an array of all uids for node authors, keyed by nid. - $uids = array(); - foreach ($nodes as $nid => $node) { - $uids[$nid] = $node->getAuthorId(); - } - - // Fetch name and data for these users. - $user_names = db_query("SELECT uid, name FROM {users} WHERE uid IN (:uids)", array(':uids' => $uids))->fetchAllKeyed(); - - // Add these values back into the node objects. - foreach ($uids as $nid => $uid) { - $nodes[$nid]->name = $user_names[$uid]; - } -} - /** * Implements hook_modules_installed(). */