Index: bio.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/bio/bio.module,v
retrieving revision 1.2.2.8
diff -u -r1.2.2.8 bio.module
--- bio.module	22 Mar 2007 18:17:53 -0000	1.2.2.8
+++ bio.module	4 May 2007 15:52:58 -0000
@@ -32,12 +32,17 @@
       $type = variable_get('bio_nodetype','bio');
       $nid  = bio_for_user(arg(1));
       // user has a bio
-      $node = $nid ? node_load($nid) : (object) array('type' => $type, 'uid' => arg(1));
       if ($nid) {
+        $node = node_load($nid);
         $access = node_access('update', $node);
       }
       else {
-        $access = node_access('create', $type);
+        $node = (object) array(
+            'type' => $type,
+            'uid' => arg(1),
+            'title' => (variable_get('bio_username2title', 0))?$user->name:'',
+        );
+        $access = (($user->uid == arg(1)) && node_access('create', $type)) || user_access('administer nodes');
       }
       $items[] = array(
         'path'  => 'user/'.arg(1).'/bio',
@@ -220,5 +225,11 @@
     '#description' => t('Display nothing but the bio node on the user profile page.'),
     '#default_value' => variable_get('bio_profile_takeover', 0),
   );
+  $form['bio_username2title'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Copy username to bio title.'),
+    '#description' => t('When bio node is created, populate its title with the user\'s name.'),
+    '#default_value' => variable_get('bio_username2title', 0),
+  );
   return system_settings_form($form);
 }
