theme_comment_post_forbidden

Versions
4.6
theme_comment_post_forbidden()
4.7 – 5
theme_comment_post_forbidden($nid)
6
theme_comment_post_forbidden($node)
7
theme_comment_post_forbidden($variables)

Code

modules/comment.module, line 1599

<?php
function theme_comment_post_forbidden() {
  global $user;
  if ($user->uid) {
    return t("you can't post comments");
  }
  else {
    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')));
    }
  }
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.