From 99af5bfd118dc657f3c5c363a237c8cef49039fd Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Mon, 10 Oct 2011 21:32:03 -0300 Subject: Check if user is logged in --- muamba-widget.tpl.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'muamba-widget.tpl.php') diff --git a/muamba-widget.tpl.php b/muamba-widget.tpl.php index 06d547b..1c79606 100644 --- a/muamba-widget.tpl.php +++ b/muamba-widget.tpl.php @@ -16,7 +16,11 @@ drupal_add_css($path .'/muamba.css'); $content = ''; $output = ''; -if (empty($transaction) && $node->uid != $user->uid) { +if (!user_is_logged_in()) { + print t('You have to be logged in to be able to ask for this item.'); + return; +} +elseif (empty($transaction) && $node->uid != $user->uid) { $content .= theme('muamba_widget_icon', array('status' => MUAMBA_REQUESTED, 'id' => $node->nid)); } elseif ($transaction['uid'] == $user->uid) { -- cgit v1.2.3