summaryrefslogtreecommitdiff
path: root/modules/blog/blog.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/blog/blog.module')
-rw-r--r--modules/blog/blog.module8
1 files changed, 3 insertions, 5 deletions
diff --git a/modules/blog/blog.module b/modules/blog/blog.module
index 8d1a08a42..2784d720d 100644
--- a/modules/blog/blog.module
+++ b/modules/blog/blog.module
@@ -29,15 +29,13 @@ function blog_perm() {
/**
* Implementation of hook_access().
*/
-function blog_access($op, $node) {
- global $user;
-
+function blog_access($op, $node, $account) {
if ($op == 'create') {
- return user_access('edit own blog') && $user->uid;
+ return user_access('edit own blog', $account) && $account->uid;
}
if ($op == 'update' || $op == 'delete') {
- if (user_access('edit own blog') && ($user->uid == $node->uid)) {
+ if (user_access('edit own blog', $account) && ($node->uid == $account->uid)) {
return TRUE;
}
}