function advpoll_access in Advanced Poll 6.2
Same name and namespace in other branches
- 5 advpoll.module \advpoll_access()
- 6.3 advpoll.module \advpoll_access()
- 6 advpoll.module \advpoll_access()
Implementation of hook_access().
File
- ./
advpoll.module, line 52 - Advanced Poll - a sophisticated polling module for voting, elections, and group decision-making.
Code
function advpoll_access($op, $node, $account) {
if ($op == 'create') {
return user_access('create polls', $account);
}
if ($op == 'update') {
if (user_access('edit polls', $account) || $node->uid == $account->uid && user_access('edit own polls', $account)) {
return TRUE;
}
}
}