blog_access

Versions
4.6 – 5
blog_access($op, $node)
6
blog_access($op, $node, $account)

Implementation of hook_access().

Code

modules/blog.module, line 25

<?php
function blog_access($op, $node) {
  global $user;

  if ($op == 'create') {
    return user_access('edit own blog') && $user->uid;
  }

  if ($op == 'update' || $op == 'delete') {
    if (user_access('edit own blog') && ($user->uid == $node->uid)) {
      return TRUE;
    }
  }
}
?>
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.