diff --git a/modules/profile.module b/modules/profile.module index 2ed1f61db3fa7f4e76fceeb5bce5754713daf72c..1e4845dff11a34191a498eee876739a3c856a80e 100644 --- a/modules/profile.module +++ b/modules/profile.module @@ -92,7 +92,7 @@ function profile_block($op = 'list', $delta = 0, $edit = array()) { else if ($op == 'configure' && $delta == 0) { // Compile a list of fields to show $fields = array(); - $result = db_query('SELECT name, title, weight FROM {profile_fields} ORDER BY weight'); + $result = db_query('SELECT name, title, weight, visibility FROM {profile_fields} WHERE visibility IN (%d, %d) ORDER BY weight', PROFILE_PUBLIC, PROFILE_PUBLIC_LISTINGS); while ($record = db_fetch_object($result)) { $fields[$record->name] = $record->title; } diff --git a/modules/profile/profile.module b/modules/profile/profile.module index 2ed1f61db3fa7f4e76fceeb5bce5754713daf72c..1e4845dff11a34191a498eee876739a3c856a80e 100644 --- a/modules/profile/profile.module +++ b/modules/profile/profile.module @@ -92,7 +92,7 @@ function profile_block($op = 'list', $delta = 0, $edit = array()) { else if ($op == 'configure' && $delta == 0) { // Compile a list of fields to show $fields = array(); - $result = db_query('SELECT name, title, weight FROM {profile_fields} ORDER BY weight'); + $result = db_query('SELECT name, title, weight, visibility FROM {profile_fields} WHERE visibility IN (%d, %d) ORDER BY weight', PROFILE_PUBLIC, PROFILE_PUBLIC_LISTINGS); while ($record = db_fetch_object($result)) { $fields[$record->name] = $record->title; }