diff options
Diffstat (limited to 'modules/profile/profile.pages.inc')
-rw-r--r-- | modules/profile/profile.pages.inc | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/modules/profile/profile.pages.inc b/modules/profile/profile.pages.inc index db65e9ac7..056015a31 100644 --- a/modules/profile/profile.pages.inc +++ b/modules/profile/profile.pages.inc @@ -17,13 +17,11 @@ function profile_browse() { if ($name && $field->fid) { // Only allow browsing of fields that have a page title set. if (empty($field->page)) { - drupal_not_found(); - return; + return MENU_NOT_FOUND; } // Do not allow browsing of private and hidden fields by non-admins. if (!user_access('administer users') && ($field->visibility == PROFILE_PRIVATE || $field->visibility == PROFILE_HIDDEN)) { - drupal_access_denied(); - return; + return MENU_ACCESS_DENIED; } // Compile a list of fields to show. @@ -54,8 +52,7 @@ function profile_browse() { $query->condition('v.value', '%' . db_like($value) . '%', 'LIKE'); break; default: - drupal_not_found(); - return; + return MENU_NOT_FOUND; } $uids = $query @@ -85,7 +82,7 @@ function profile_browse() { return $output; } elseif ($name && !$field->fid) { - drupal_not_found(); + return MENU_NOT_FOUND; } else { // Compile a list of fields to show. |