public function do_authenticate() { // データベースを操作します。 $SystemModel = new SystemModel(); $userdata = $SystemModel->get_authinfo($_POST['username']); if (!empty($userdata['password']) && $this->auth->check_password($_POST['password'], $userdata['password'])) { $this->auth->auth_ok($userdata); $this->screen_top(); } else { $this->auth_error_mess = $this->auth->auth_no(); $this->screen_login(); } }
public function do_authenticate() { $SystemModel = new SystemModel(); $data = $this->form->getSubmitValues(); $userdata = $SystemModel->get_authinfo($data['mail']); if (!empty($userdata['password']) && $this->auth->check_pass($userdata['password'], $data['password'])) { $this->auth->auth_system_ok($userdata); $this->screen_top(); } else { $this->message = "メールもしくはパスが異なります"; $this->screen_login(); } }