Including "/" in Username (legalized)
Posted: 2016-12-06 14:46
Please how do I make "/" to be part of my username for example "2016/GD1234/P"
A place where AppGini users can exchange ideas and help each other.
https://forums.appgini.com:443/phpbb/
https://forums.appgini.com:443/phpbb/viewtopic.php?f=7&t=2288
Code: Select all
function is_allowed_username($username){
$username = trim(strtolower($username));
if(!preg_match('/^[a-z0-9][a-z0-9 _.@]{3,19}$/', $username) || preg_match('/(@@| |\.\.|___)/', $username)) return false;
if(sqlValue("select count(1) from membership_users where lcase(memberID)='{$username}'")) return false;
return $username;
}