Skip to content
This repository was archived by the owner on Jun 17, 2019. It is now read-only.
This repository was archived by the owner on Jun 17, 2019. It is now read-only.

No support for plus-addressed emails #49

@ryanjkelly

Description

@ryanjkelly

WordPress strips + from plus-addressed email addresses (e.g. user+filter@example.com), causing the username in WordPress to not match up with the username recorded into ONTRAPORT.

As a result, the user/customer can still log into the WordPress site with they're email address, since WordPress allows you to log in with either username or email address, but none of the unlocked membership levels are acknowledged since the username in WordPress no longer matches up with the username in ONTRAPORT.

To confirm my theory, I did the following:

  • created an account with a plus-addressed username
  • logged in and tried to view some restricted pages
  • got the "You do not have sufficient access" message
  • manually removed the plus sign from my membership username field in ONTRAPORT
  • refreshed the restricted pages, and was able to view them just fine

Here's where WordPress is sanitizing the +:

https://github.com/WordPress/WordPress/blob/0c37fe30ac20264046bed70e10321d6d11f23cef/wp-includes/formatting.php#L2093

As a temporary workaround, I might override the sanitize_user function using a filter hook to allow plus-addressed emails. Is that a workaround you would recommend?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions