summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/comment.module16
-rw-r--r--modules/comment/comment.module16
2 files changed, 16 insertions, 16 deletions
diff --git a/modules/comment.module b/modules/comment.module
index cf7771212..b474cff7d 100644
--- a/modules/comment.module
+++ b/modules/comment.module
@@ -138,14 +138,14 @@ function comment_configure() {
*
* Provides signature customization for the user's comments.
*/
-function comment_user($type, $edit, &$user) {
- switch ($type) {
- case 'edit':
- // when user tries to edit his own data
- return array(t('Personal information') => form_textarea(t('Signature'), 'signature', $user->signature, 64, 3, t('Your signature will be publicly displayed at the end of your comments.') .'<br />'. filter_tips_short()));
- case 'validate':
- // validate user data editing
- return array('signature' => $edit['signature']);
+function comment_user($type, $edit, &$user, $category = NULL) {
+ if ($type == 'form' && $category == 'account') {
+ // when user tries to edit his own data
+ return array(array('title' => t('Comment settings'), 'data' => form_textarea(t('Signature'), 'signature', $user->signature, 64, 3, t('Your signature will be publicly displayed at the end of your comments.') .'<br />'. filter_tips_short()), 'weight' => 2));
+ }
+ if ($type == 'validate') {
+ // validate user data editing
+ return array('signature' => $edit['signature']);
}
}
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index cf7771212..b474cff7d 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -138,14 +138,14 @@ function comment_configure() {
*
* Provides signature customization for the user's comments.
*/
-function comment_user($type, $edit, &$user) {
- switch ($type) {
- case 'edit':
- // when user tries to edit his own data
- return array(t('Personal information') => form_textarea(t('Signature'), 'signature', $user->signature, 64, 3, t('Your signature will be publicly displayed at the end of your comments.') .'<br />'. filter_tips_short()));
- case 'validate':
- // validate user data editing
- return array('signature' => $edit['signature']);
+function comment_user($type, $edit, &$user, $category = NULL) {
+ if ($type == 'form' && $category == 'account') {
+ // when user tries to edit his own data
+ return array(array('title' => t('Comment settings'), 'data' => form_textarea(t('Signature'), 'signature', $user->signature, 64, 3, t('Your signature will be publicly displayed at the end of your comments.') .'<br />'. filter_tips_short()), 'weight' => 2));
+ }
+ if ($type == 'validate') {
+ // validate user data editing
+ return array('signature' => $edit['signature']);
}
}