summaryrefslogtreecommitdiff
path: root/modules/node/node.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/node/node.module')
-rw-r--r--modules/node/node.module5
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/node/node.module b/modules/node/node.module
index 85a49cfed..56d4b75be 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -2322,7 +2322,6 @@ function _node_access_rebuild_batch_finished($success, $results, $operations) {
* Named so as not to conflict with node_access()
*/
function node_content_access($op, $node, $account) {
- global $user;
$type = is_string($node) ? $node : (is_array($node) ? $node['type'] : $node->type);
if ($op == 'create') {
@@ -2330,13 +2329,13 @@ function node_content_access($op, $node, $account) {
}
if ($op == 'update') {
- if (user_access('edit any '. $type .' content', $account) || (user_access('edit own '. $type .' content', $account) && ($user->uid == $node->uid))) {
+ if (user_access('edit any '. $type .' content', $account) || (user_access('edit own '. $type .' content', $account) && ($account->uid == $node->uid))) {
return TRUE;
}
}
if ($op == 'delete') {
- if (user_access('delete any '. $type .' content') || (user_access('delete own '. $type .' content') && ($user->uid == $node->uid))) {
+ if (user_access('delete any '. $type .' content', $account) || (user_access('delete own '. $type .' content', $account) && ($account->uid == $node->uid))) {
return TRUE;
}
}