Index: modules/comment/comment.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v
retrieving revision 1.529
diff -u -p -r1.529 comment.module
--- modules/comment/comment.module	12 Mar 2007 13:08:02 -0000	1.529
+++ modules/comment/comment.module	24 Mar 2007 21:23:35 -0000
@@ -454,26 +454,9 @@ function comment_nodeapi(&$node, $op, $a
 
 /**
  * Implementation of hook_user().
- *
- * Provides signature customization for the user's comments.
  */
 function comment_user($type, $edit, &$user, $category = NULL) {
-  if ($type == 'form' && $category == 'account') {
-    // when user tries to edit his own data
-    $form['comment_settings'] = array(
-      '#type' => 'fieldset',
-      '#title' => t('Comment settings'),
-      '#collapsible' => TRUE,
-      '#weight' => 4);
-    $form['comment_settings']['signature'] = array(
-      '#type' => 'textarea',
-      '#title' => t('Signature'),
-      '#default_value' => $edit['signature'],
-      '#description' => t('Your signature will be publicly displayed at the end of your comments.'));
-
-    return $form;
-  }
-  elseif ($type == 'delete') {
+  if ($type == 'delete') {
     db_query('UPDATE {comments} SET uid = 0 WHERE uid = %d', $user->uid);
     db_query('UPDATE {node_comment_statistics} SET last_comment_uid = 0 WHERE last_comment_uid = %d', $user->uid);
   }
@@ -1538,7 +1521,7 @@ function comment_form($edit, $title = NU
     $form['subject'] = array('#type' => 'textfield', '#title' => t('Subject'), '#maxlength' => 64, '#default_value' => !empty($edit['subject']) ? $edit['subject'] : '');
   }
 
-  $form['comment_filter']['comment'] = array('#type' => 'textarea', '#title' => t('Comment'), '#rows' => 15, '#default_value' => !empty($edit['comment']) ? $edit['comment'] : $user->signature, '#required' => TRUE);
+  $form['comment_filter']['comment'] = array('#type' => 'textarea', '#title' => t('Comment'), '#rows' => 15, '#default_value' => $edit['comment'], '#required' => TRUE);
   if (!isset($edit['format'])) {
     $edit['format'] = FILTER_FORMAT_DEFAULT;
   }
Index: modules/user/user.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.module,v
retrieving revision 1.760
diff -u -p -r1.760 user.module
--- modules/user/user.module	24 Mar 2007 05:36:30 -0000	1.760
+++ modules/user/user.module	24 Mar 2007 21:23:39 -0000
@@ -1432,6 +1432,21 @@ function user_edit_form($uid, $edit, $re
     }
   }
 
+  // Signature:
+  if (module_exists('comment')) {
+    $form['signature_settings'] = array(
+      '#type' => 'fieldset',
+      '#title' => t('Signature settings'),
+      '#weight' => 1,
+    );
+    $form['signature_settings']['signature'] = array(
+      '#type' => 'textarea',
+      '#title' => t('Signature'),
+      '#default_value' => $edit['signature'],
+      '#description' => t('Your signature will be publicly displayed at the end of your comments.'),
+    );
+  }
+
   // Picture/avatar:
   if (variable_get('user_pictures', 0) && !$register) {
     $form['picture'] = array('#type' => 'fieldset', '#title' => t('Picture'), '#weight' => 1);
@@ -2759,3 +2774,30 @@ function user_forms() {
   return $forms;
 }
 
+/**
+ * Implementation of hook_comment().
+ *
+ * Append signatures to comments.
+ */
+function user_comment(&$comment, $op) {
+  switch ($op) {
+    case 'view':
+      $author = user_load(array('uid' => $comment->uid));
+      $comment->comment .= theme('user_signature', check_markup($author->signature, $comment->format));
+      break;
+  }
+}
+
+/**
+ * Output a user's signature.
+ *
+ * @ingroup themeable
+ */
+function theme_user_signature($signature) {
+  return "
+<div class=\"user-signature clear\">
+-- 
+$signature
+</div>
+";
+}
