diff options
-rw-r--r-- | modules/comment.module | 7 | ||||
-rw-r--r-- | modules/comment/comment.module | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/modules/comment.module b/modules/comment.module index aa4005acb..a3e98ffd0 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -1608,7 +1608,12 @@ function theme_comment_post_forbidden() { return t("you can't post comments"); } else { - return t('<a href="%login">login</a> or <a href="%register">register</a> to post comments', array('%login' => url('user/login'), '%register' => url('user/register'))); + if (variable_get('user_register', 1)) { + return t('<a href="%login">login</a> or <a href="%register">register</a> to post comments', array('%login' => url('user/login'), '%register' => url('user/register'))); + } + else { + return t('<a href="%login">login</a> to post comments', array('%login' => url('user/login'))); + } } } diff --git a/modules/comment/comment.module b/modules/comment/comment.module index aa4005acb..a3e98ffd0 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -1608,7 +1608,12 @@ function theme_comment_post_forbidden() { return t("you can't post comments"); } else { - return t('<a href="%login">login</a> or <a href="%register">register</a> to post comments', array('%login' => url('user/login'), '%register' => url('user/register'))); + if (variable_get('user_register', 1)) { + return t('<a href="%login">login</a> or <a href="%register">register</a> to post comments', array('%login' => url('user/login'), '%register' => url('user/register'))); + } + else { + return t('<a href="%login">login</a> to post comments', array('%login' => url('user/login'))); + } } } |