It works great thanks
--------------- Added [DATE]1340032478[/DATE] at [TIME]1340032478[/TIME] ---------------
The code is a little hard to understand. I want to see if the email input is an email or not and if it is an email it goes to the email input if it isn't it goes to the username input, i tried this code with no result what can i do?
PHP Code:
if (empty($email))
{
if (eregi("^([a-z0-9]|\\-|\\.)+@(([a-z0-9]|\\-)+\\.)+[a-z]{2,4}$", $email))
{
$vbulletin->input->clean_gpc('p', 'email', TYPE_STR);
}
else
{
$vbulletin->input->clean_gpc('p', 'username', TYPE_STR);
}
$email = htmlspecialchars_uni($vbulletin->GPC['email']);
}