--- content_profile.module	2010-01-13 04:38:26.000000000 -0600
+++ content_profile.module.new	2010-03-29 16:47:29.000000000 -0500
@@ -99,7 +99,8 @@ function content_profile_page_access($ty
  * Presents a node editing or adding form for the given content profile.
  */
 function content_profile_page_edit($type, $account) {
-  drupal_set_title(check_plain($account->name));
+  $name = isset($user->realname) ? $user->realname : $user->name;
+  drupal_set_title(check_plain($name));
   $node = content_profile_load($type, $account->uid);
   if (!$node) {
     $node = array('uid' => $account->uid, 'name' => (isset($account->name) ? $account->name : ''), 'type' => $type, 'language' => '');
