diff options
-rw-r--r-- | modules/profile.module | 2 | ||||
-rw-r--r-- | modules/profile/profile.module | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/profile.module b/modules/profile.module index 2ed1f61db..1e4845dff 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 2ed1f61db..1e4845dff 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; } |