Total Members: 520 Total Tutorials: 242 Newsest User:8884244477 Todays Unique Hits: 393
0 Users • 6 Guests Online
User System (Part 2)
Want to stop people registering on your site with names they shouldn't be using?
This tutorial will allow you to create a list of username which cannot be used during the signup process.
For this tutorial I will assume you already have folled the User System (Part 1) tutorial and this is working correctly.
$blockedusernames=array("Bad Name 1","Bad Name 2","Bad Name 3");if(in_array($username,$blockedusernames)){$detected="True";}if($detected=='True'){echo"Bad username detected, Please use a different username.";}else
This is a very simple yet effective way to stop people using usernames, you can add as many blocked names as you like to the array.