function blog_access in Drupal 4
Same name and namespace in other branches
- 5 modules/blog/blog.module \blog_access()
- 6 modules/blog/blog.module \blog_access()
Implementation of hook_access().
File
- modules/
blog.module, line 25 - Enables keeping an easily and regularly updated web page or a blog.
Code
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;
}
}
}