summaryrefslogtreecommitdiff
path: root/modules/comment/comment.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r--modules/comment/comment.module6
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'];
}