WordPress.org

Ready to get started?Download WordPress

Forums

REQ: Accept '+' in email address (tagged address (2 posts)

  1. apthorpe
    Member
    Posted 10 years ago #

    Just a simple feature request; change line 346 in ./wp-includes/functions.php from:
    <pre>
    345 function is_email($user_email) {
    346 $chars = "/^([a-z0-9_]|\\-|\\.)+@(([a-z0-9_]|\\-)+\\.)+[a-z]{2,4}\$/i";
    347 if(strstr($user_email, '@') && strstr($user_email, '.')) {
    </pre>
    to
    <pre>
    345 function is_email($user_email) {
    346 $chars = "/^([a-z0-9_][a-z0-9_.+-]*)+@(([a-z0-9_-])+\\.)+[a-z]{2,6}\$/i";
    347 if(strstr($user_email, '@') && strstr($user_email, '.')) {
    </pre>
    This fixes WordPress to allow plus-tagged email addresses as supported by Postfix, etc.. It's a little more RFC-compliant too...
    Note also that the TLD portion of the domain has been changed to [a-z]{2,6} from [a-z]{2,4} to account for the .museum TLD.

  2. Jean-Pierre Michaud
    Member
    Posted 10 years ago #

    for 1.1, this function is in wp-includes/functions-formatting.php
    ... that's where i found it btw! and we only have the $char ... line to edit, not the second one.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.