function _blog_post_exists
_blog_post_exists($account)
Helper function to determine if a user has blog posts already.
File
- modules/blog/blog.module, line 182
- Enables multi-user blogs.
Code
function _blog_post_exists($account) { return (bool) db_select('node', 'n') ->fields('n', array('nid')) ->condition('type', 'blog') ->condition('uid', $account->uid) ->condition('status', 1) ->range(0, 1) ->addTag('node_access') ->execute() ->fetchField(); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!blog!blog.module/function/_blog_post_exists/7.x