Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jeff Farthing

    (@jfarthing84)

    Are you sure? The code that handles this function is pretty concise:

    public function wp_authenticate( &$user_login ) {
    	global $wpdb;
    
    	$login_type = $this->get_option( 'login_type' );
    
    	if ( 'default' == $login_type )
    		return;
    
    	if ( ! is_email( $user_login ) && 'email' == $login_type ) {
    		$user_login = -1;
    
    	} elseif ( is_email( $user_login ) ) {
    		if ( $found = $wpdb->get_var( $wpdb->prepare( "SELECT user_login FROM $wpdb->users WHERE user_email = %s", $user_login ) ) )
    			$user_login = $found;
    	}
    }

    That basically says that if the login type is default (i.e. username only) to not run this code.

    Thread Starter Rookie

    (@sofrankly)

    Yes, sure. I just checked to make sure it is not a mislabeling of the options due to my not using the english version of the plugin. The two other settings (e-mail only and username/e-mail) work as expected. The labels on the login form switch for all settings but username only de facto accepts the e-mail anyway. Have you done a functional test?

    Plugin Author Jeff Farthing

    (@jfarthing84)

    Sorry – you’re right. As of version 4.5, WordPress core now accepts username or email by default. I’ll need to rework TML’s settings/implementation for 4.5. (It’s currently tested up to 4.4.3)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Login by username only fails’ is closed to new replies.