WordPress.org

Make WordPress Core

Ticket #14031: 14031.3.diff

File 14031.3.diff, 543 bytes (added by JohnPBloch, 7 years ago)

Fix logic

  • wp-login.php

     
    671671setTimeout( function(){ try{
    672672<?php if ( $user_login || $interim_login ) { ?>
    673673d = document.getElementById('user_pass');
     674d.value = '';
    674675<?php } else { ?>
    675676d = document.getElementById('user_login');
    676 <?php } ?>
     677<?php if ( 'invalid_username' == $errors->get_error_code() ) { ?>
     678if( d.value != '' )
    677679d.value = '';
     680<?php
     681}
     682}?>
    678683d.focus();
    679684} catch(e){}
    680685}, 200);