The WP-Members Advanced Options extension has been updated to version 2.1.0.
This release has some improvements for the way that accounts with duplicate emails are handled. It also includes an update to the upgrade API.
Duplicate Emails
It’s important to emphasize that WP does not technically support allowing accounts with duplicate emails (i.e. email addresses that already have an account). WP’s technical specs require usernames and emails to be unique.
With that being said, the Advanced Options extension does include support for allowing duplicate emails. The 2.1.0 update includes a couple of improvements to this feature.
In order to support duplicate emails and get past WP’s validation functions that shut it down, WP-Members Advanced Options “spoofs” the email address by adding some random characters to it before form validation, and then removing those after processing. That gets it around WP. That process is hooked to a WP-Members action hook that other users may also use for redirecting on registration or profile update. If a custom action was added that was set at the default priority (10), it may inadvertently be fired before the action that sets the spoofed email back to the original value. This update sets the priority for this processing to run earlier (5) so that any other actions will not interfere (unless someone sets their action to run at priority 5 or lower).
The other improvement for dupe emails is a filter for the emails that get sent to the user and to an admin on registration. Because the email functions run before the spoof email is set back to the original value, the admin notification included the spoof value rather than the actual email, and worse, the email to the user was trying to be sent to the spoof value. This update has a filter to fix this and makes sure the emails have the right value.
Other Improvements
The upgrade API was updated to be localized (translated) and also to have its own text domain so that it does not have to rely on the extension it is packaged with. Some translation work has been done for German, Dutch, and Spanish. This will allow for translation of the license key form.
There were also some code improvements that will be implemented across all of the plugin extensions to remove certain constants and replace them with values contained in the object class.