At first glance, it seems like a "bad idea" because you are allowing anyone to:
- verify an account exists
- confirm the association between a username and an email address
If usernames and mail addresses are treated as "private" information on your site and not already shared, then I would not implement the username lookup by email feature. In effect you are lowering the security bar by 1 factor:
- Currrently, looking up the username requires both email address and the user's full mail credentials (so they can pick up the reply)
- After the change, all they need is the mail address.
Perhaps more significantly, you create a privacy issue that would need to be addressed (as mentioned by @SoapBox).
But in reality, your site might already employ "username" as a public handle or nickname. And you may already have users publishing their email in their profiles. If this is the case, the username lookup doesn't leak any new information and you could argue no new security or privacy issues are created.
It would make it all a little too easy though, like publishing the script kiddies guide on how to hack my site:
- Get a list of email addresses from your preferred supplier
- Come to my self-service mail-to-username translation page and run the list through (simple script for this)
- Launch dictionary attack on the site using the resulting list of usernames
Bottom line - I think you are best to leave this feature as-is.