Changeset 483
- Timestamp:
- 08/10/06 12:49:38 (2 years ago)
- Files:
-
- devel/config-dist.php (modified) (1 diff)
- devel/lib/elgglib.php (modified) (2 diffs)
- devel/sanitychecks.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
devel/config-dist.php
r481 r483 43 43 $CFG->publicinvite = true; 44 44 45 // If the following string is non-blank, it must be present within 46 // the domains of email addresses of people signing up. For example, 47 // if you set it to yourinstitution.edu, a user with the email address 48 // foo@bar.yourinstitution.edu will be able to sign up. 49 // This rule will hold true for both public registrations and invitations 50 // from within the system (if either are enabled). 51 52 $CFG->emailfilter = ""; 53 45 54 // The following sets the default access level within the Elgg 46 55 // site. Possible values include: devel/lib/elgglib.php
r454 r483 1967 1967 1968 1968 /** 1969 * Validates an email to make sure it makes sense. 1969 * Validates an email to make sure it makes sense and adheres 1970 * to the email filter if it's set. 1970 1971 * 1971 1972 * @param string $address The email address to validate. … … 1974 1975 function validate_email($address) { 1975 1976 1976 return (ereg('^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+'. 1977 global $CFG; 1978 1979 if (ereg('^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+'. 1977 1980 '@'. 1978 1981 '[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.'. 1979 1982 '[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$', 1980 $address)); 1983 $address)) { 1984 1985 if ($CFG->emailfilter != "") { 1986 $domain = substr($address,strpos($address,"@")); 1987 if (substr_count($domain,$CFG->emailfilter) == 0) { 1988 return false; 1989 } 1990 } 1991 1992 return true; 1993 1994 } else { 1995 return false; 1996 } 1981 1997 } 1982 1998 devel/sanitychecks.php
r481 r483 35 35 if (!isset($CFG->publicinvite)) { 36 36 $CFG->publicinvite = $CFG->publicreg; 37 } 38 if (!isset($CFG->emailfilter)) { 39 $CFG->emailfilter = ""; 37 40 } 38 41 if (!isset($CFG->walledgarden)) {
