Index: src/wp-includes/user-functions.php
===================================================================
--- src/wp-includes/user-functions.php	(revision 34809)
+++ src/wp-includes/user-functions.php	(working copy)
@@ -1182,7 +1182,7 @@
  */
 function validate_username( $username ) {
 	$sanitized = sanitize_user( $username, true );
-	$valid = ( $sanitized == $username );
+	$valid = ( $sanitized == $username && ! empty( $sanitized ) );
 	/**
 	 * Filter whether the provided username is valid or not.
 	 *
Index: tests/phpunit/tests/user.php
===================================================================
--- tests/phpunit/tests/user.php	(revision 34809)
+++ tests/phpunit/tests/user.php	(working copy)
@@ -596,6 +596,20 @@
 			if ( ! defined( 'WP_IMPORTING' ) ) {
 				$this->assertWPError( $return );
 			}
+	}
+
+	/**
+	 * @ticket 24618
+	 */
+	function test_validate_username() {
+
+		$this->assertTrue( validate_username( 'testusername' ) );
+		$this->assertTrue( validate_username( 'JohnDoe' ) );
+		$this->assertTrue( validate_username( 'test@test.com' ) );
+		$this->assertFalse( validate_username( '' ) );
+		$this->assertFalse( validate_username( '@#&99sd' ) );
+
+	}
 		}
 	}
 
