mirror of
https://github.com/processwire/processwire.git
synced 2025-08-18 04:22:10 +02:00
Minor adjustments
This commit is contained in:
@@ -145,6 +145,7 @@ class WireMail extends WireData implements WireMailInterface {
|
||||
*
|
||||
*/
|
||||
protected function sanitizeEmail($email) {
|
||||
if(!strlen($email)) return '';
|
||||
$email = strtolower(trim($email));
|
||||
$clean = $this->wire('sanitizer')->email($email);
|
||||
if($email !== $clean) {
|
||||
|
@@ -446,6 +446,10 @@ class WireMailTools extends Wire {
|
||||
$inBlacklist = false;
|
||||
$tt = $this->wire('sanitizer')->getTextTools();
|
||||
$email = trim($tt->strtolower($email));
|
||||
|
||||
if(strpos($email, '@') === false) {
|
||||
return $options['why'] ? "Invalid email address" : true;
|
||||
}
|
||||
|
||||
foreach($blacklist as $line) {
|
||||
$line = $tt->strtolower(trim($line));
|
||||
|
Reference in New Issue
Block a user