eFiction Email Vali...
 
Notifications
Clear all

eFiction Email Validation

2 Posts
2 Users
0 Reactions
1,533 Views
(@piper)
Posts: 91
Trusted Member
Topic starter
 

site: http://www.tgfiction.net/eFiction30Beta/
running eFiction 3.5 latest.

Hi, not sure if I should post this here or in bugs or whatnot, but I'll post here and hope it gets in the right place.

I recently got an email from a user that wanted to register @ my site saying the system wouldn't accept her email. The problem is her email is in the following format blah.blah@blah.blah.co.uk

I went into editbio.php and replaced:

                else if(!validEmail($email)) $output .= "<div style='text-align: center;'>"._INVALIDEMAIL." "._TRYAGAIN."</div>";

with:

                else if(!filter_var($email, FILTER_VALIDATE_EMAIL)) {$output .= "<div style='text-align: center;'>"._INVALIDEMAIL." "._TRYAGAIN."</div>";}

Now, the way I understand it, the method I used is only valid in PHP5, and more importantly is a security issue in PHP<5.2.3 . Is there a better way I could have/should have delt with this issue (other than telling the user to get a new email address)?

-Piper/Kirstyn Amanda Fox


StoryPortal Fiction Network - StoryPortal.Net
TG Fiction dot NET | T* Fiction Archive - TGFiction.Net
LG Tales | TG Style Fiction for LG's - LGTales.Com

 
Posted : 17/12/2008 8:26 pm
 Elle
(@jenny)
Posts: 594
Honorable Member
 

I've never had that problem before...but you could try another e-mail validation function.

One that springs to mind: http://code.google.com/p/php-email-address-validation/


archive: dramione.org
site: accio.nu

Available for skin/mod commission! πŸ™‚

 
Posted : 17/12/2008 9:03 pm
Share: