How to use email or username to login

I used the ojs2.4.8, I know how to use email to login, but I don’t know how to combine the two ways. Do you have any better ideas? Please give me some words.
Thanks,
yours