public function auth() { // $model = new \core\components\model\Auth(); // $data = $model->getAllUsers(); $view = new \core\components\view\User(); $view->authPage(null); }
public function getAuth() { $this->name = $_POST['email']; $this->password = $_POST['password']; $model = new \core\components\model\Auth(); $result = $model->authorization($this->name, $this->password); if (!$result) { $view = new \core\components\view\User(); $view->authPage(['err'], [1]); } else { $view = new \core\components\view\User(); $view->authSuccessPage(); } }