Changeset 481

Show
Ignore:
Timestamp:
08/10/06 12:14:34 (2 years ago)
Author:
ben
Message:

Whether users can invite new users is now a separate flag to whether public users can register outright.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • devel/_invite/index.php

    r478 r481  
    1414 
    1515    // You must be logged on to view this! 
    16         if (logged_on) { 
     16        if (logged_on && $CFG->publicinvite == true) { 
    1717         
    1818        $title = gettext("Invite a Friend"); 
     
    3333                    ); 
    3434                } else { 
    35                     header("Location: " . url); 
     35                    header("Location: " . $CFG->wwwroot); 
    3636                } 
    3737 
  • devel/config-dist.php

    r477 r481  
    3737 
    3838    $CFG->publicreg = true; 
     39     
     40// The following should be set to false if you don't want users 
     41// to be able to invite new users into the system. 
     42 
     43    $CFG->publicinvite = true; 
    3944 
    4045// The following sets the default access level within the Elgg 
  • devel/mod/friend/lib.php

    r479 r481  
    4747                                                              "Access controls")); 
    4848 
    49                 if (public_reg == true) { 
     49                if ($CFG->publicinvite == true) { 
    5050                    $PAGE->menu_sub[] = array( 'name' => 'friend:invite', 
    5151                                               'html' => a_hrefg( "{$CFG->wwwroot}_invite/", 
  • devel/sanitychecks.php

    r424 r481  
    2828    } elseif (substr($CFG->dataroot, -1) != "/") { 
    2929        $diemessages[] = 'Configuration problem: The <code>$CFG->dataroot</code> setting in config.php must end with a forward slash (/).'; 
     30    } 
     31     
     32     
     33    // Set defaults for some variables 
     34     
     35    if (!isset($CFG->publicinvite)) { 
     36        $CFG->publicinvite = $CFG->publicreg; 
     37    } 
     38    if (!isset($CFG->walledgarden)) { 
     39        $CFG->walledgarden = 0; 
    3040    } 
    3141     
  • devel/units/invite/invite_actions.php

    r383 r481  
    11<?php 
    22global $USER; 
     3global $CFG; 
    34// Kill all old invitations 
    45 
     
    1819         $invite->email = trim(optional_param('invite_email')); 
    1920         if (!empty($invite->name) && !empty($invite->email)) { 
    20              if (logged_on || public_reg == true) { 
     21             if (logged_on || $CFG->publicinvite == true) { 
    2122                 if (validate_email(stripslashes($invite->email))) { 
    2223                     $strippedname = stripslashes($invite->name); // for the message text.