It does. He's using the ternary operator.
IF the username contains any characters that are not [a-zA-Z0-9_], then it returns a FALSE (i.e. Invalid), otherwise TRUE (i.e. valid).
If you want it written out:
function validate_username($v_username) {
return eregi('[^a-z0-9_]', $v_username) ? FALSE : TRUE;
}
// That is the same as this:
function validate_username($v_username){
if(eregi('[^a-zA-Z0-9_]', $v_username))
{
// THe username contains an inavlid character
return FALSE;
}
else
{
return TRUE;
}
}
~Brett