X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Finvite.php;h=fe706a5244d90007d475f13cf656b3b43dd3a328;hb=e59377d96b09c8d7bc0090ce2cea0e99517c7d9b;hp=3f9efc57427a5a881fee5fe5fa22ceed718e6b57;hpb=d5a13b1e4c0f35445aa539ff6b3779062907a9cb;p=friendica.git diff --git a/mod/invite.php b/mod/invite.php index 3f9efc5742..fe706a5244 100644 --- a/mod/invite.php +++ b/mod/invite.php @@ -17,12 +17,13 @@ function invite_post(&$a) { $recip = trim($recip); - if(!eregi('[A-Za-z0-9._%-]+@[A-Za-z0-9._%-]+\.[A-Za-z]{2,6}', $recip)) { - notice( $recip . t(' : ') . t('Not a valid email address.') . EOL); + if(! valid_email($recip)) { + notice( $recip . t(' : ') . t('Not a valid email address.') . EOL); continue; } - $res = mail($recip, t('Please join my network on ') . $a->config['sitename'], $message, "From: " . $a->user['email']); + $res = mail($recip, t('Please join my network on ') . $a->config['sitename'], + $message, "From: " . $a->user['email']); if($res) { $total ++; }