Your WordPress login username can be leaked easily via author archive page’s permalink
http://domain.com/author/username/The part here is /author/username/, as this is where your login username could be leaked.
How it can happen?When we create a new user on your WordPress site, we assign this user a username for login purpose.
There is a field in the WordPress database called user_nicename, which can be found in the wp_users table. User_nicename is populated with the login username as the user is created. Once user_nicename is populated, it cannot be changed from WordPress’ Dashboard.
WordPress uses user_nicename will be added to the author archive page permalink.
For example, you’ve created a new user called user1. The author archive URL will be the following,
http://domain.com/author/user1, you will get the author page
You can test this by using any wp site where you have blog post added. For eg:
http://www.domain.com/blog/author/bloguser/Please change "bloguser" with your username and you will see a list of all the posts by the particular user
How this can be prevented?By changing user_nicename to different from your actual login username, it becomes more difficult for hackers to figure out what the login username is.
The user_nice name cannot be updated through Wordpress Dashboard, and it can be done by editing the wp-user table using mysql client tool. For eg: phpMyAdmin,HeidiSQL
By changing a user nice name to "user-new", and keep the login as "user1" the author achive page will show the URL as
http://domain.com/author/user-new and the actual username "user1" cannot be traced by a hacker.