You are here

function blog_page_user_access in Blog 3.x

Same name and namespace in other branches
  1. 8.2 blog.module \blog_page_user_access()

Access callback for user blog pages.

File

./blog.module, line 99
Enables multi-user blogs.

Code

function blog_page_user_access($account) {

  // The visitor must be able to access the site's content.
  // For a blog to 'exist' the user must either be able to
  // create new blog entries, or it must have existing posts.
  return $account
    ->id() && $account
    ->hasPermission('access content') && ($account
    ->hasPermission('create blog content', $account) || _blog_post_exists($account));
}