--- realname.module.orig	2009-03-19 10:19:27.000000000 -0400
+++ realname.module	2009-08-12 10:03:03.000000000 -0400
@@ -162,12 +162,27 @@ function realname_check_breadcrumbs($acc
  */
 function realname_user_view($account) {
   realname_check_breadcrumbs($account);
-  // Retrieve all profile fields and attach to $account->content.
-  user_build_content($account);
-
-  // To theme user profiles, copy modules/user/user_profile.tpl.php
-  // to your theme directory, and edit it as instructed in that file's comments.
-  return theme('user_profile', $account);
+  
+  if ((module_exists('delegator') || module_exists('page_manager')) && module_invoke('ctools', 'api_version', '1.0')) {
+    // Load my task plugin:
+    $task = module_exists('delegator') ? delegator_get_task('user_view') : page_manager_get_task('user_view');
+
+    // Load the account into a context.
+    ctools_include('context');
+    ctools_include('context-task-handler');
+    $contexts = ctools_context_handler_get_task_contexts($task, '', array($account));
+
+    $output = ctools_context_handler_render($task, '', $contexts, array($account->uid));
+  }
+  if ($output === FALSE) {
+    // Retrieve all profile fields and attach to $account->content.
+    user_build_content($account);
+
+    // To theme user profiles, copy modules/user/user_profile.tpl.php
+    // to your theme directory, and edit it as instructed in that file's comments.
+    $output = theme('user_profile', $account);
+  }
+  return $output;
 }
 
 /**
