function invite_pagesetup() { global $PAGE; if (defined('context') && context == 'network' && isloggedin()) { if (!maxusers_limit()) { $PAGE->menu_sub[] = array('name' => 'invite:friend', 'html' => a_href(get_url(null, 'invite::invite'), __gettext("Invite a friend"))); } } }
$messages[] = __gettext("Invitation failed: you must specify both a name and an email address."); } break; // Join using an invitation // Join using an invitation case "invite_join": $code = trim(optional_param('invitecode')); $name = trim(optional_param('join_firstname')); $lastname = trim(optional_param('join_lastname')); $mail = trim(optional_param('join_email')); $username = trim(strtolower(optional_param('join_username'))); $password1 = trim(optional_param('join_password1')); $password2 = trim(optional_param('join_password2')); $accept = trim(optional_param('accept')); if (isset($name) && isset($code)) { if (maxusers_limit()) { $messages[] = __gettext("Unfortunately this community has reached its account limit and you are unable to join at this time."); break; } if (empty($name)) { $messages[] = __gettext('You must provide a first name.'); break; } if (empty($lastname)) { $messages[] = __gettext('You must provide a lastname.'); break; } if (empty($mail)) { $messages[] = __gettext('You must provide an email.'); break; }