function forum_access in Drupal 5
Same name and namespace in other branches
- 4 modules/forum.module \forum_access()
- 6 modules/forum/forum.module \forum_access()
Implementation of hook_access().
File
- modules/
forum/ forum.module, line 112 - Enable threaded discussions about general topics.
Code
function forum_access($op, $node) {
global $user;
if ($op == 'create') {
return user_access('create forum topics');
}
if ($op == 'update' || $op == 'delete') {
if (user_access('edit own forum topics') && $user->uid == $node->uid) {
return TRUE;
}
}
}