aboutsummaryrefslogtreecommitdiffstats
path: root/mod/invite.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/invite.php')
-rw-r--r--mod/invite.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/mod/invite.php b/mod/invite.php
index 3f9efc574..fe706a524 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 ++;
}