Well guys, I'm here because I want to do something advanced on my site, and I don't know how do this and if is possible do this.
It's like this:
Someone will register on my site and have an function to verify if this name is blocked or not in "array()", but some specials characters is avaible to put on your name, like ".", "-"... And if I register like this name "A.D.M", my verification doesn't work.
You guys can help me with this?
My function:
final static function isBlockedName($name) {
$blockedNames = array ('mod', 'adm', 'staff');
foreach($blockedNames as $list) {
if(strtolower($name) == strtolower($list)) {
self::AddBan('user','157788000',self::getUserID($name),'Nome Impróprio','3');
session_destroy();
header('Location: /');
exit;
}
}
foreach($blockedNames as $two) {
if(strpos(strtolower($name), strtolower($two)) !== false) {
self::AddBan('user','157788000',self::getUserID($name),'Nome Impróprio','3');
session_destroy();
header('Location: /');
exit;
}
}
return false;
}
Sorry for my bad english :(