Thanks for your inquiry. ~ We appreciate your patience :-)
Does anybody know if it is possible to disable the password strength indicator feature? Also is it possible to default email address as username?
I would advise against trying to modify the WordPress core in this regard, because many areas of WordPress, and almost all plugins rely on a strict Username validation and sanitation, which would not expect nor allow characters found in email addresses, such as the @ symbol. This becomes even more of an issue in a Multisite Network installation of WordPress.
Instead, you might try pre-populating the Username field, via JavaScript. Perhaps using jQuery to fill the Username field with only the first part of the email address being typed in ( i.e. johndoe22@example.com ), would automatically populate the Username field with: johndoe22, and then the User would have the ability to change it if they like something better. This would need to be custom coded (just a few lines), and then connected via the Hook login_head for the WordPress core.
<?php
add_action ("login_head", "s2_email_to_username", 1000);
function s2_email_to_username ()
{
?>
<script type = "text/javascript">
(function ($) // Wraps this `$ = jQuery` routine.
{
$.fn.swapWith = function (to) // Utility extension for jQuery.
{
return this.each (function ()
{
var $to = $ (to).clone (true), $from = $ (this).clone (true);
$(to).replaceWith ($from), $ (this).replaceWith ($to);
});
};
$(document).ready (function () // Handles email-to-username on keyup.
{
var email = 'input#user_email', login = 'input#user_login';
$(email).closest ('p').swapWith ($ (login).closest ('p')), $ (email).keyup (function ()
{
$(login).val ($.trim ($ (email).val ().split (/@/)[0].replace (/[^\w]/gi, '')));
});
});
}) (jQuery);
</script>
<?php
}
?>
To hide s2Member’s Password Strength Indicators, please add this to your theme’s style.css file, or into a box for Custom CSS in the Dashboard, if your theme provides that feature. This will work with all s2Member Pro Forms.
div.ws-plugin--s2member-password-strength
{
display:none;
}