diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2011-10-10 21:32:03 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2011-10-10 21:32:03 -0300 |
commit | 99af5bfd118dc657f3c5c363a237c8cef49039fd (patch) | |
tree | 2516ac1f2c83c9afc07f0e69dce9e6d57353335e /muamba-widget.tpl.php | |
parent | db6fd9706157928ce20fc26689fe9db41d533537 (diff) | |
download | muamba-99af5bfd118dc657f3c5c363a237c8cef49039fd.tar.gz muamba-99af5bfd118dc657f3c5c363a237c8cef49039fd.tar.bz2 |
Check if user is logged in
Diffstat (limited to 'muamba-widget.tpl.php')
-rw-r--r-- | muamba-widget.tpl.php | 6 |
1 files changed, 5 insertions, 1 deletions
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) { |