1.20.x comment.entity.inc public static Comment::createAccess($bundle = NULL, $account = NULL)

Overrides Entity::createAccess().

Overrides Entity::createAccess

File

modules/comment/comment.entity.inc, line 132
Entity controller and class for comments.

Class

Comment
Defines the comment entity class.

Code

public static function createAccess($bundle = NULL, $account = NULL) {
  // If no user object is supplied, the access check is for the current user.
  if (empty($account)) {
    $account = $GLOBALS['user'];
  }

  return user_access('post comments', $account);
}