diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-03-14 23:01:38 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-03-14 23:01:38 +0000 |
commit | 3b3050959952ceae617b59246f364f4b0edd2dcd (patch) | |
tree | b7cc39b97156ee0f346334d1e8dd78b5662c40e7 /modules/node/node.module | |
parent | 8a0d326a8e134ad4261b9575ce073f9e44b72f60 (diff) | |
download | brdo-3b3050959952ceae617b59246f364f4b0edd2dcd.tar.gz brdo-3b3050959952ceae617b59246f364f4b0edd2dcd.tar.bz2 |
#347250 by catch, drewish, and Berdir: Add function for loading multiple users in one request.
Diffstat (limited to 'modules/node/node.module')
-rw-r--r-- | modules/node/node.module | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/node/node.module b/modules/node/node.module index a83cfbdc5..1772759e7 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -984,7 +984,7 @@ function node_validate($node, $form = array()) { if (user_access('administer nodes')) { // Validate the "authored by" field. - if (!empty($node->name) && !($account = user_load(array('name' => $node->name)))) { + if (!empty($node->name) && !($account = user_load_by_name($node->name))) { // The use of empty() is mandatory in the context of usernames // as the empty string denotes the anonymous user. In case we // are dealing with an anonymous user we set the user ID to 0. @@ -1035,7 +1035,7 @@ function node_submit($node) { if (user_access('administer nodes')) { // Populate the "authored by" field. - if ($account = user_load(array('name' => $node->name))) { + if ($account = user_load_by_name($node->name)) { $node->uid = $account->uid; } else { |