diff --git a/setup.php b/setup.php index 6e6e927..55e5abc 100644 --- a/setup.php +++ b/setup.php @@ -204,12 +204,12 @@ class Setup while (!$this->_username = readline($this->l('Username: '))) { echo Console::log($this->l('Username must be set'), 'red') . PHP_EOL; }; - while (!$this->_email || ($this->_email && $this->checkEmail($this->_email))) { + while (!$this->_email || ($this->_email && !$this->trueEmail($this->_email))) { $this->_email = readline('E-mail: '); if (!$this->_email) { echo Console::log($this->l('E-mail must be set'), 'red') . PHP_EOL; } - if (!$this->checkEmail($this->_email)) { + if (!$this->trueEmail($this->_email)) { echo Console::log($this->l('E-mail must be correct'), 'red') . PHP_EOL; } } @@ -227,7 +227,7 @@ class Setup echo Console::log($this->l('Admin account complete'), 'green') . PHP_EOL; } - private function checkEmail($email): bool + private function trueEmail($email): bool { $email = filter_var($email, FILTER_VALIDATE_EMAIL); return $email ? true : false;