How can I allow a user to use an Email as their username?

Hey guys!

So I am creating something that takes their username (which could be an email), and looks it up in a DB. Then, it sets the Username to the Username column.

I cannot seem to find where it checks if the username field == email.

The reason I am doing this?

I am creating a verification. So far, I have it set so that you need to register with your acc and password. The problem is that around 2012, they changed new users to have to use their email. So I need to get rid of the check that sees if the username field contains an email.