diff --git a/modules/comment.module b/modules/comment.module index 9baf10ce98bf560e80c486335ddcfb2f5624747a..bc663a3ec0b159fdb7576feda7a936344c1fbc7e 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -44,9 +44,15 @@ function comment_conf_options() { function comment_user($type, $edit, &$user) { switch ($type) { case "view_public": - return form_item(t("Signature"), check_output($user->signature, 1)); + if ($user->signature) { + return form_item(t("Signature"), check_output($user->signature, 1)); + } + break; case "view_private": - return form_item(t("Signature"), check_output($user->signature, 1)); + if ($user->signature) { + return form_item(t("Signature"), check_output($user->signature, 1)); + } + break; case "edit_form": // when user tries to edit his own data return form_textarea(t("Signature"), "signature", $edit["signature"], 70, 3, t("Your signature will be publicly displayed at the end of your comments.") ."<br />". t("Allowed HTML tags") .": ". htmlspecialchars(variable_get("allowed_html", "<a> <b> <dd> <dl> <dt> <i> <li> <ol> <u> <ul>"))); diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 9baf10ce98bf560e80c486335ddcfb2f5624747a..bc663a3ec0b159fdb7576feda7a936344c1fbc7e 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -44,9 +44,15 @@ function comment_conf_options() { function comment_user($type, $edit, &$user) { switch ($type) { case "view_public": - return form_item(t("Signature"), check_output($user->signature, 1)); + if ($user->signature) { + return form_item(t("Signature"), check_output($user->signature, 1)); + } + break; case "view_private": - return form_item(t("Signature"), check_output($user->signature, 1)); + if ($user->signature) { + return form_item(t("Signature"), check_output($user->signature, 1)); + } + break; case "edit_form": // when user tries to edit his own data return form_textarea(t("Signature"), "signature", $edit["signature"], 70, 3, t("Your signature will be publicly displayed at the end of your comments.") ."<br />". t("Allowed HTML tags") .": ". htmlspecialchars(variable_get("allowed_html", "<a> <b> <dd> <dl> <dt> <i> <li> <ol> <u> <ul>"))); diff --git a/modules/jabber.module b/modules/jabber.module index 47be2babfd9381261e578ba0710b23598379b727..c69aa4463f6a1975e955ee9c16c4b807fd6c227b 100644 --- a/modules/jabber.module +++ b/modules/jabber.module @@ -168,7 +168,9 @@ function jabber_user($type, $edit, $user) { switch ($type) { case "view_private": $result = user_get_authname($user, $module); - $output .= form_item(t("$name ID"), $result); + if ($result) { + $output .= form_item(t("$name ID"), $result); + } return $output; case "edit_form": $result = user_get_authname($user, $module);