Did you set the username field of all users to an email in the database? If that's the case and the old username isn't stored anywhere you can't bring it back. If you are just using a hook to set username to email then you can disable that code and username should go back to normal.
The displayname property is calculated from user.fullname and user.username based on the user setting show my fullname and if they have entered a fullname in their edit profile page.