Cristian asked me to take another look at this for you.
I just did a quick review of that plugin you posted. It looks like the changes this plugin makes will allow the Pro Login Widget to function this way also. So it’s fine. The only remaining issue is the wording in the Pro Login Widget itself. Instead of asking a User for a “Username” in the Pro Login Widget, it might be desirable to ask for Username or Email Address.
The change needed is at line #118 inside:
/s2member-pro/includes/classes/login-widget.inc.php
Find:
echo '<label for="ws-plugin--s2member-pro-login-widget-username">' . _x ("Username", "s2member-front", "s2member") . ':</label><br />' . "\n";
Change to:
echo '<label for="ws-plugin--s2member-pro-login-widget-username">' . _x ("Username or Email Address", "s2member-front", "s2member") . ':</label><br />' . "\n";
This could be handled with a Filter against gettext_with_context, but that might produce unwanted changes in other areas of s2Member, where all you’d want is just Username. Therefore, it’s better to hard code this particular change following the instructions above. I’ll see what we can do to make this simpler going forward.