Jump to content

break the Email as a username..


meto5757

Recommended Posts

If you always add a semi-colon to the username, and you don't allow it to be used in usernames, you don't need regular expressions for this.

Just a simple substr () and strpos () combination.

 

That said: Why would you store the username and e-mail combined? This goes against good database design, and as such you're only creating more work for yourself. As evidenced by this thread. I recommend storing them in two different fields, as you were. If you want to use the e-mail in addition to the username as a possible identificator when your users log in, then add an "OR" in your query.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.