diff --git a/modules/node/node.module b/modules/node/node.module index db81fc7..b63ce86 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -1013,7 +1013,7 @@ function node_validate($node, $form, &$form_state) { } // Validate the "authored by" field. - if (!empty($node->name) && !($account = user_load($node->uid))) { + 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. @@ -2604,7 +2604,7 @@ function node_feed($nids = FALSE, $channel = array()) { $node->link = url("node/$node->nid", array('absolute' => TRUE)); $node->rss_namespaces = array(); - $account = user_load_by_name($node->name); + $account = user_load($node->uid); $node->rss_elements = array( array('key' => 'pubDate', 'value' => gmdate('r', $node->created)), array('key' => 'dc:creator', 'value' => format_username($account)),