summaryrefslogtreecommitdiff
path: root/modules/profile/profile.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-05-29 11:37:33 +0000
committerDries Buytaert <dries@buytaert.net>2010-05-29 11:37:33 +0000
commitb801d14ad1fc5965250bd45085bccd09589a4bd1 (patch)
treef0798dcad0130281ce8160adc01eef2ecc05ca11 /modules/profile/profile.module
parent75e847346df726ddedf789e0f5cbb813cb21e947 (diff)
downloadbrdo-b801d14ad1fc5965250bd45085bccd09589a4bd1.tar.gz
brdo-b801d14ad1fc5965250bd45085bccd09589a4bd1.tar.bz2
- Patch #591048 by Damien Tournoud: the author information block was broken. Added tests.
Diffstat (limited to 'modules/profile/profile.module')
-rw-r--r--modules/profile/profile.module4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/profile/profile.module b/modules/profile/profile.module
index 5aabb3d7d..9960f2845 100644
--- a/modules/profile/profile.module
+++ b/modules/profile/profile.module
@@ -179,12 +179,12 @@ function profile_block_view($delta = '') {
$output = '';
if ((arg(0) == 'node') && is_numeric(arg(1)) && (arg(2) == NULL)) {
$node = node_load(arg(1));
- $account = user_load(array('uid' => $node->uid));
+ $account = user_load($node->uid);
if ($use_fields = variable_get('profile_block_author_fields', array())) {
// Compile a list of fields to show.
$fields = array();
- $result = db_query('SELECT name, title, weight, visibility FROM {profile_field} WHERE visibility IN (:visibility) ORDER BY weight', array(':visibility' => array(PROFILE_PUBLIC, PROFILE_PUBLIC_LISTINGS)));
+ $result = db_query('SELECT * FROM {profile_field} WHERE visibility IN (:visibility) ORDER BY weight', array(':visibility' => array(PROFILE_PUBLIC, PROFILE_PUBLIC_LISTINGS)));
foreach ($result as $record) {
// Ensure that field is displayed only if it is among the defined block fields and, if it is private, the user has appropriate permissions.
if (isset($use_fields[$record->name]) && $use_fields[$record->name]) {