aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mod/invitefriends/start.php16
1 files changed, 9 insertions, 7 deletions
diff --git a/mod/invitefriends/start.php b/mod/invitefriends/start.php
index 8f71314b3..f39d25f4b 100644
--- a/mod/invitefriends/start.php
+++ b/mod/invitefriends/start.php
@@ -12,13 +12,15 @@ function invitefriends_init() {
elgg_register_action('invitefriends/invite', elgg_get_plugins_path() . 'invitefriends/actions/invite.php');
- $params = array(
- 'name' => 'invite',
- 'text' => elgg_echo('friends:invite'),
- 'href' => "invite",
- 'contexts' => array('friends'),
- );
- elgg_register_menu_item('page', $params);
+ if (elgg_is_logged_in()) {
+ $params = array(
+ 'name' => 'invite',
+ 'text' => elgg_echo('friends:invite'),
+ 'href' => "invite",
+ 'contexts' => array('friends'),
+ );
+ elgg_register_menu_item('page', $params);
+ }
}
/**