Doctrine orm 致命错误:类';用户';未找到-Doctrine2/CodeIgniter2

Doctrine orm 致命错误:类';用户';未找到-Doctrine2/CodeIgniter2,doctrine-orm,codeigniter-2,Doctrine Orm,Codeigniter 2,当我尝试运行我的登录脚本时,我一直遇到以下错误。我已经基于我已经就位的db模式创建了一个Entities文件夹 Fatal error: Class 'User' not found in /xxxx/xxxxx/public_html/application/controllers/signup.php on line 23 代码: public function __construct() { parent::__construct(); $thi

当我尝试运行我的登录脚本时,我一直遇到以下错误。我已经基于我已经就位的db模式创建了一个Entities文件夹

Fatal error: Class 'User' not found in /xxxx/xxxxx/public_html/application/controllers/signup.php on line 23
代码:
    public function __construct() {
        parent::__construct();

        $this->load->helper(array('form','url'));
        $this->load->library('form_validation');
    }

    public function index() {
        $this->load->view('login_form');
    }

    public function submit() {

        if ($this->_submit_validate() === FALSE) {
            $this->index();
            return;
        }

        redirect('/');

    }

    private function _submit_validate() {

        $this->form_validation->set_rules('UserName', 'Username', 
            'trim|required|callback_authenticate');

        $this->form_validation->set_rules('Password', 'Password',
            'trim|required');

        $this->form_validation->set_message('authenticate','Invalid login. Please try again.');

        return $this->form_validation->run();

    }

    public function authenticate() {

        return Current_User::login($this->input->post('UserName'), 
                                    $this->input->post('Password'));

    }
}

您尚未提供有关当前用户类的任何信息。我假设当前用户是您的模型,在这种情况下,将authenticate函数更改为

public function authenticate() {
     $this->load->model('current_user');
     return $this->current_user->login($this->input->post('UserName'), 
                                $this->input->post('Password'));
    }

您尚未提供有关当前用户类的任何信息。我假设当前用户是您的模型,在这种情况下,将authenticate函数更改为

public function authenticate() {
     $this->load->model('current_user');
     return $this->current_user->login($this->input->post('UserName'), 
                                $this->input->post('Password'));
    }