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