Ticket #358 (new enhancement)

Opened 6 months ago

Last modified 6 months ago

Vastly improved email filter

Reported by: eavdmeer Assigned to: nobody
Priority: normal Milestone: 0.9.2
Component: new functionality Version: 0.9.1
Severity: normal Keywords: email, filter, block
Cc: Patch Included: 1
Review Stage: reviewed

Description

The builtin email filter $CFG->emailfilter for new accounts is a bit limited. It only allows accounts from a single domain. The patch included in this ticket adds the following:

- You can now use a regular expression for the match. For example:

$CFG->emailfilter = '/.*\.org$/'; This will allow everybody with a .org email address to register. See the manual of preg_match for the syntax of the regular expressions.

- You can now use an array in the email filter to allow multiple domains:

$CFG->emailfilter = array('elgg.org', 'gmail.com'); Naturally, any entry in the array can be a regular expression.

- In addition to the email filter, there is now a email block list that works in a similar way. It allows you to block any domain you with:

$CFG->emailblock = array('hotmail.com', '/\.*\.org$/'); This blocks anything from hotmail or any .org address.

You can use both $CFG->emailfilter and $CFG->emailblock at the same time. The block list will have precedence.

Attachments

validate_email.patch (3.3 kB) - added by eavdmeer on 05/26/08 10:52:43.
Patch for validate_email function

Change History

05/26/08 10:52:43 changed by eavdmeer

  • attachment validate_email.patch added.

Patch for validate_email function

05/29/08 08:48:43 changed by misja

  • severity changed from major to normal.
  • review_stage changed from unreviewed to reviewed.

Please consider adding an entry to mod/lib/elggadmin/configdef.php for managing $CFG->emailblock and a usage description.