]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Refs #2968 invite friends link should not be available for non-logged in users
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sat, 2 Apr 2011 18:41:00 +0000 (18:41 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sat, 2 Apr 2011 18:41:00 +0000 (18:41 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@8914 36083f99-b078-4883-b0ff-0f9b5a30f544

mod/invitefriends/start.php

index 8f71314b38514e9b1b019faa3400ca9c3399aa78..f39d25f4b19d70b50dcbfa242880d03d6c922be1 100644 (file)
@@ -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);
+       }
 }
 
 /**