summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/profile.module3
-rw-r--r--modules/profile/profile.module3
2 files changed, 2 insertions, 4 deletions
diff --git a/modules/profile.module b/modules/profile.module
index 64db5ffcb..b898e93eb 100644
--- a/modules/profile.module
+++ b/modules/profile.module
@@ -53,8 +53,7 @@ function profile_block($op = 'list', $delta = 0, $edit = array()) {
else if ($op == 'view') {
if (user_access('access user profiles')) {
if ((arg(0) == 'node') && is_numeric(arg(1)) && (arg(2) == NULL)) {
- $result = db_query('SELECT uid FROM {node} WHERE nid = %d ORDER BY uid DESC', arg(1));
- $node = db_fetch_object($result);
+ $node = node_load(arg(1));
$account = user_load(array('uid' => $node->uid));
if ($use_fields = variable_get('profile_block_author_fields', array())) {
diff --git a/modules/profile/profile.module b/modules/profile/profile.module
index 64db5ffcb..b898e93eb 100644
--- a/modules/profile/profile.module
+++ b/modules/profile/profile.module
@@ -53,8 +53,7 @@ function profile_block($op = 'list', $delta = 0, $edit = array()) {
else if ($op == 'view') {
if (user_access('access user profiles')) {
if ((arg(0) == 'node') && is_numeric(arg(1)) && (arg(2) == NULL)) {
- $result = db_query('SELECT uid FROM {node} WHERE nid = %d ORDER BY uid DESC', arg(1));
- $node = db_fetch_object($result);
+ $node = node_load(arg(1));
$account = user_load(array('uid' => $node->uid));
if ($use_fields = variable_get('profile_block_author_fields', array())) {