X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Femails.inc.php;h=de05ed2d717de038e1bec432106d9d3ada4b368a;hb=353f2d2b11c4e3c6c0bc3553813368b6f42fa9c6;hp=084d25b77dfb18e80526635f0907eaab1f1bfb9f;hpb=c12cc82e1d97b51e19b294942ea9450a34d929cd;p=platal.git diff --git a/include/emails.inc.php b/include/emails.inc.php index 084d25b..de05ed2 100644 --- a/include/emails.inc.php +++ b/include/emails.inc.php @@ -55,8 +55,11 @@ function valide_email($str) $em = trim(rtrim($str)); $em = str_replace('<', '', $em); $em = str_replace('>', '', $em); + if (strpos($em, '@') === false) { + return; + } list($ident, $dom) = explode('@', $em); - if ($dom == $globals->mail->domain or $dom == $globals->mail->domain2) { + if ($dom == $globals->mail->domain || $dom == $globals->mail->domain2) { list($ident1) = explode('_', $ident); list($ident) = explode('+', $ident1); }