Changeset 504
- Timestamp:
- 08/15/06 20:09:50 (2 years ago)
- Files:
-
- devel/config-dist.php (modified) (1 diff)
- devel/lib/displaylib.php (modified) (2 diffs)
- devel/mod/friend/lib.php (modified) (1 diff)
- devel/sanitychecks.php (modified) (1 diff)
- devel/units/display/function_log_on_pane.php (modified) (1 diff)
- devel/units/invite/invite_actions.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
devel/config-dist.php
r492 r504 42 42 43 43 $CFG->publicinvite = true; 44 45 // Set this to a positive number to cap the number of users in your 46 // installation, for example if you're testing and only have a certain number 47 // of resources available to you. 48 49 $CFG->maxusers = 0; 44 50 45 51 // Set this to 1 to enable a walled garden - i.e., if you're not logged in, devel/lib/displaylib.php
r457 r504 173 173 174 174 global $page_owner; 175 176 global $CFG; 175 177 176 178 // If this is someone else's portfolio, display the user's icon … … 183 185 $body = '<form action="'.url.'login/index.php" method="post">'; 184 186 185 if (public_reg == true ) {187 if (public_reg == true && ($CFG->maxusers == 0 || (count_users('person') < $CFG->maxusers))) { 186 188 $reg_link = '<a href="' . url . '_invite/register.php">'. gettext("Register") .'</a> |'; 187 189 } else { devel/mod/friend/lib.php
r499 r504 47 47 gettext("Access controls"))); 48 48 49 if ($CFG->publicinvite == true ) {49 if ($CFG->publicinvite == true && ($CFG->maxusers == 0 || (count_users('person') < $CFG->maxusers))) { 50 50 $PAGE->menu_sub[] = array( 'name' => 'friend:invite', 51 51 'html' => a_href( "{$CFG->wwwroot}_invite/", devel/sanitychecks.php
r483 r504 38 38 if (!isset($CFG->emailfilter)) { 39 39 $CFG->emailfilter = ""; 40 } 41 if (!isset($CFG->maxusers)) { 42 $CFG->maxusers = 0; 40 43 } 41 44 if (!isset($CFG->walledgarden)) { devel/units/display/function_log_on_pane.php
r473 r504 13 13 $body .= '<form action="'.url.'login/index.php" method="post">'; 14 14 15 if (public_reg == true ) {15 if (public_reg == true && ($CFG->maxusers == 0 || (count_users('person') < $CFG->maxusers))) { 16 16 $reg_link = '<a href="' . url . '_invite/register.php">'. gettext("Register") .'</a> |'; 17 17 } else { devel/units/invite/invite_actions.php
r481 r504 19 19 $invite->email = trim(optional_param('invite_email')); 20 20 if (!empty($invite->name) && !empty($invite->email)) { 21 if (logged_on || $CFG->publicinvite == true) { 21 if (logged_on || ($CFG->publicinvite == true)) { 22 if (($CFG->maxusers == 0 || (count_users('person') < $CFG->maxusers))) { 22 23 if (validate_email(stripslashes($invite->email))) { 23 24 $strippedname = stripslashes($invite->name); // for the message text. … … 60 61 } 61 62 } else { 63 $messages[] = gettext("Error: This community has reached its maximum number of users."); 64 } 65 } else { 66 $messages[] = gettext("Invitation failed: you are not logged in."); 67 } 68 } else { 62 69 $messages[] = gettext("Invitation failed: you must specify both a name and an email address."); 63 }64 70 } 65 71 break; … … 73 79 $password2 = trim(optional_param('join_password2')); 74 80 if (isset($name) && isset($code)) { 81 if (($CFG->maxusers == 0 || (count_users('person') < $CFG->maxusers))) { 82 $messages[] = gettext("Unfortunately this community has reached its account limit and you are unable to join at this time."); 83 } 75 84 if (empty($over13)) { 76 85 $messages[] = gettext("You must indicate that you are at least 13 years old to join.");
