Codeigniter с ion_auth - не могу войти, нет проверки

Использование codeigniter с ion_auth. На странице входа видно, что проверка не работает; «if ($this->form_validation->run() == true)» всегда возвращает false, но в форме не отображаются сообщения об ошибках. Это готовый контроллер и вид, я ничего не редактировал. Не уверен, как это отлаживать; есть идеи?

Это функция, которая работает, но не работает:

function login()
{
    $this->data['title'] = "Login";

    //validate form input
    $this->form_validation->set_rules('identity', 'Identity', 'required');
    $this->form_validation->set_rules('password', 'Password', 'required');

    if ($this->form_validation->run() == true)
    {
        // check to see if the user is logging in
        // check for "remember me"
        $remember = (bool) $this->input->post('remember');

        if ($this->ion_auth->login($this->input->post('identity'), $this->input->post('password'), $remember))
        {
            //if the login is successful
            //redirect them back to the home page
            $this->session->set_flashdata('message', $this->ion_auth->messages());
            redirect('/', 'refresh');
        }
        else
        {
            // if the login was un-successful
            // redirect them back to the login page             
            $this->session->set_flashdata('message', $this->ion_auth->errors());
            redirect('auth/login', 'refresh'); // use redirects instead of loading views for compatibility with MY_Controller libraries
        }
    }
    else
    {
        // the user is not logging in so display the login page
        // set the flash data error message if there is one
        $this->data['message'] = (validation_errors()) ? validation_errors() : $this->session->flashdata('message');

        $this->data['identity'] = array('name' => 'identity',
            'id'    => 'identity',
            'type'  => 'text',
            'value' => $this->form_validation->set_value('identity'),
        );
        $this->data['password'] = array('name' => 'password',
            'id'   => 'password',
            'type' => 'password',
        );

        $this->_render_page('auth/login', $this->data);
    }
}

person Jon    schedule 20.01.2016    source источник


Ответы (1)


Страница публиковалась не в том месте. Дух.

person Jon    schedule 20.01.2016