The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#10
|
|||
|
|||
![]()
Yeah, I can't follow all that. But there's a vbulletin function is_valid_email() that you can call. It just does this:
Code:
return preg_match('#^[a-z0-9.!\#$%&\'*+-/=?^_`{|}~]+@([0-9.]+|([^\s\'"<>@,;]+\.+[a-z]{2,6}))$#si', $email); But if what you're saying is that you have one input field named email, but it might be a user name, then I think you'd want to do this: Code:
$vbulletin->input->clean_gpc('p', 'email', TYPE_STR); $input_email = htmlspecialchars_uni($vbulletin->GPC['email']); if (is_valid_email($input_email)) { if (empty($email)) { $email = $input_email; } } else { if (empty($username)) { $username = $input_email; } } This probably bypasses the check for a valid/unused username, but that just means the user would just get an error after submitting. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|