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/comment/comment.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/comment/comment.module')
-rw-r--r-- | modules/comment/comment.module | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 177518c34..71b3ea219 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -1283,7 +1283,7 @@ function comment_validate($edit) { form_set_error('date', t('You have to specify a valid date.')); } } - if (isset($edit['author']) && !$account = user_load(array('name' => $edit['author']))) { + if (isset($edit['author']) && !$account = user_load_by_name($edit['author'])) { form_set_error('author', t('You have to specify a valid author.')); } @@ -1607,7 +1607,7 @@ function comment_form_add_preview($form, &$form_state) { // Attach the user and time information. if (!empty($edit['author'])) { - $account = user_load(array('name' => $edit['author'])); + $account = user_load_by_name($edit['author']); } elseif ($user->uid && !isset($edit['is_anonymous'])) { $account = $user; @@ -1687,7 +1687,7 @@ function _comment_form_submit(&$comment_values) { $comment_values['timestamp'] = strtotime($comment_values['date']); if (isset($comment_values['author'])) { - $account = user_load(array('name' => $comment_values['author'])); + $account = user_load_by_name($comment_values['author']); $comment_values['uid'] = $account->uid; $comment_values['name'] = $comment_values['author']; } |