Index: content_types/user_picture.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/panels/content_types/user_picture.inc,v retrieving revision 1.1.2.3 diff -u -p -r1.1.2.3 user_picture.inc --- content_types/user_picture.inc 27 May 2008 20:21:11 -0000 1.1.2.3 +++ content_types/user_picture.inc 16 Jul 2008 18:08:37 -0000 @@ -21,14 +21,17 @@ function panels_user_picture_panels_cont * based on the module and delta supplied in the configuration. */ function panels_content_user_picture($conf, $panel_args, $context) { - $account = isset($context->data) ? drupal_clone($context->data) : NULL; - $block = new stdClass(); - $block->module = 'term-list'; + if (!is_object($context->data)) { + return; + } - if ($account === FALSE || ($account->access == 0 && !user_access('administer users'))) { - return drupal_not_found(); + $account = drupal_clone($context->data); + if ((!user_access('access user profiles') || $account->access == 0) && !user_access('administer users')) { + return; } + $block = new stdClass(); + $block->module = 'term-list'; $block->title = check_plain($account->name); $block->content = theme('user_picture', $account); Index: content_types/user_profile.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/panels/content_types/user_profile.inc,v retrieving revision 1.1.2.3 diff -u -p -r1.1.2.3 user_profile.inc --- content_types/user_profile.inc 27 May 2008 20:21:11 -0000 1.1.2.3 +++ content_types/user_profile.inc 16 Jul 2008 18:14:34 -0000 @@ -21,13 +21,18 @@ function panels_user_profile_panels_cont * based on the module and delta supplied in the configuration. */ function panels_content_user_profile($conf, $panel_args, $context) { - $account = isset($context->data) ? drupal_clone($context->data) : NULL; + if (!is_object($context->data)) { + return; + } + + $account = drupal_clone($context->data); + if ((!user_access('access user profiles') || $account->access == 0) && !user_access('administer users')) { + return; + } + $block = new stdClass(); $block->module = 'term-list'; - if ($account === FALSE || ($account->access == 0 && !user_access('administer users'))) { - return drupal_not_found(); - } // Retrieve and merge all profile fields: $fields = array(); foreach (module_list() as $module) {