latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Password strength indicator

Home Forums Community Forum Password strength indicator

This topic contains 2 replies, has 3 voices. Last updated by  Jason (Lead Developer) 3 years, 11 months ago.

Topic Author Topic
Posted: Wednesday Jan 30th, 2013 at 6:22 pm #40029

Does anybody know if it is possible to disable the password strength indicator feature? Also is it possible to default email address as username?

  • This topic was modified 3 years, 11 months ago by  Doug Reitmeyer.
  • This topic was modified 3 years, 11 months ago by  Eduan. Reason: Moved to the customer support forum
  • This topic was modified 3 years, 11 months ago by  Eduan. Reason: Moved to the customer support forum

List Of Topic Replies

Viewing 2 replies - 1 through 2 (of 2 total)
Author Replies
Author Replies
Posted: Saturday Feb 2nd, 2013 at 10:04 am #40420
Eduan
Username: Eduan
Moderator

Hello Doug,

I believe that password strength indicator is added by WordPress, I think. In what form do you want to remove it?

And no, it is not possible to make the username an email unless you modify WordPress to work this way, and of course s2Member to know things are going to work that way. :)

– Eduan

Posted: Saturday Feb 2nd, 2013 at 11:12 am #40434
Staff Member

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;
	}
Viewing 2 replies - 1 through 2 (of 2 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.