diff options
Diffstat (limited to 'muamba.misc.inc')
-rw-r--r-- | muamba.misc.inc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/muamba.misc.inc b/muamba.misc.inc index 70aa598..d15b056 100644 --- a/muamba.misc.inc +++ b/muamba.misc.inc @@ -93,7 +93,7 @@ function muamba_actions($code = NULL) { * TRUE on success, FALSE otherwise. */ function muamba_has_request_access($node) { - if (!$node || $node->type != MUAMBA_NODE_TYPE || !node_access('view', $node)) { + if (!user_is_logged_in() || !$node || $node->type != MUAMBA_NODE_TYPE || !node_access('view', $node)) { return FALSE; } @@ -113,6 +113,10 @@ function muamba_has_request_access($node) { * TRUE if block exists, FALSE otherwise. */ function muamba_user_has_blocked($node, $user) { + if (!user_is_logged_in()) { + return FALSE; + } + if (module_exists('pm_block_user')) { $owner = user_load($node->uid); if (pm_block_user_has_blocked($user, $owner)) { @@ -140,7 +144,7 @@ function muamba_has_management_access($node, $user = NULL) { global $user; } - if (!$node || $node->type != MUAMBA_NODE_TYPE || $node->uid != $user->uid) { + if (!user_is_logged_in() || !$node || $node->type != MUAMBA_NODE_TYPE || $node->uid != $user->uid) { return FALSE; } |