Skip to content

Update controller.ext.php#305

Open
evandone wants to merge 1 commit intosentora:masterfrom
evandone:patch-1
Open

Update controller.ext.php#305
evandone wants to merge 1 commit intosentora:masterfrom
evandone:patch-1

Conversation

@evandone
Copy link
Copy Markdown

@evandone evandone commented Jul 7, 2017

Allow email addresses that include a plus sign for tagging/local filtering.

@5050
Copy link
Copy Markdown
Contributor

5050 commented Jul 7, 2017

I have the feeling that it would be more efficient and reliable to use:

static function IsValidEmail($email) {
return filter_var($email, FILTER_VALIDATE_EMAIL) !== false;
}

or even to remove completely the function IsValidEmail($email) and to call each time directly filter_var() instead.

Can someone else more accustomed to filter_var() confirm or deny?

@rakhmanov
Copy link
Copy Markdown

Agreed, It should be:

static function IsValidEmail($email) {
    return !!filter_var($email, FILTER_VALIDATE_EMAIL)
}

Or keep as Is, there are bunch of the issues with email verification. And caveats in each solution but at least this is de facto one.

@TGates71
Copy link
Copy Markdown
Member

TGates71 commented Feb 1, 2024

@Dukecitysolutions - was this ever resolved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants