Ticket #227: 01217_invite_link.diff

File 01217_invite_link.diff, 1.3 kB (added by rho, 1 year ago)
  • mod/community/lib.php

    old new  
    141141                                  'user_type' => 'community'); 
    142142 
    143143    // Add membership requests to the personal network page 
    144     if (defined("context") && context == "network" && $page_owner == $_SESSION['userid']) { 
     144    if (defined("context") && context == "network" && isloggedin() && $page_owner == $_SESSION['userid']) { 
    145145          $PAGE->menu_sub[] = array( 'name' => 'membership:invites', 
    146146                                   'html' => a_href( "{$CFG->wwwroot}{$username}/communities/invitations", 
    147147                                                      __gettext("Community invitations"))); 
  • mod/invite/lib.php

    old new  
    3939function invite_pagesetup() { 
    4040    global $PAGE; 
    4141 
    42     if (defined('context') && context == 'network') { 
     42    if (defined('context') && context == 'network' && isloggedin()) { 
    4343        if (!maxusers_limit()) { 
    4444            $PAGE->menu_sub[] = array( 'name' => 'invite:friend', 
    4545                                       'html' => a_href(get_url(null, 'invite::invite'),