Support » Plugin: Enforce Strong Password » Bug Fix: user_login doesn't exist in POST values.

  • Resolved Dan Rossiter


    In version 3.5.1 the user_value index does not exist in the POST value so line 171 in enforce-strong-password.php is throwing an error. If you change the function to use $current_user->user_login instead, the issue should be resolved.

    The function would look like this with the change described:

    function strong_password_enforcement( $errors ) {
    	extract( $this->get_options() );
    	if ( !$errors->get_error_data("pass")
    	  && $_POST["pass1"]
    	  && $this->get_password_strength( $_POST["pass1"], $current_user->user_login ) < $minimal_required_strength ) {
    				__( 'Please enter a %sstronger%s password to ensure your and this blog\'s security.', self::txd ),
    	return $errors;

Viewing 7 replies - 1 through 7 (of 7 total)
  • Yes, I got the same notice.

    Notice: Undefined index: user_login in /web/htdocs/home/wp-content/plugins/enforce-strong-password/enforce-strong-password.php on line 171

    Plugin Author Jan Štětina


    Thanks for notifying me, this issue should be fixed in 1.3.3. Please confirm.

    Just updated. I got two more notices.
    These are not bugs, the plugin works correctly,
    anyway with debug activated, I got these:

    Notice: Undefined variable: current_user in /web/htdocs/ on line 168
    Notice: Trying to get property of non-object in /web/htdocs/ on line 168

    By the way, this could help you:
    I got the notices when updating the profile and the password is not strong enough.

    Plugin Author Jan Štětina


    Try version 1.3.4.

    Perfect! Everything’s resolved!
    Thank you very much!

    Plugin Author Jan Štětina


    You are welcome. 🙂

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Bug Fix: user_login doesn't exist in POST values.’ is closed to new replies.