[eluser]ibnclaudius[/eluser]
I don't know why, but running in autoload works.
The error also occurs with:
Code:
$this->load->library('encrypt');
:SSS
Controller:
Code:
<?php
class Site extends CI_Controller
{
public function __construct()
{
parent::__construct();
$this->load->helper(array('url'));
$this->load->library(array('mb_auth_lib', 'session'));
$this->output->enable_profiler(true);
}
public function index()
{
redirect('/entrar', 'location');
}
public function login()
{
$this->load->library('form_validation');
if ($this->input->server('REQUEST_METHOD') === 'POST')
{
$this->load->helper('form');
if ($this->input->post('action') === 'LOGIN')
{
$this->form_validation->set_rules('email', 'email', 'required');
$this->form_validation->set_rules('password', 'password', 'required');
if ($this->form_validation->run() !== FALSE)
{
$this->load->library('encrypt');
$data = array('email' => $this->input->post('email'),
'password' => $this->encrypt->sha1($this->input->post('password'))
);
if ($this->mb_auth_lib->login($data))
{
redirect('usuario/mural', 'location');
}
else
{
$data['inexistent_login'] = TRUE;
}
}
}
}
$data['title'] = 'MeuBoletim';
$data['page'] = 'login';
$this->load->view('layout', $data);
}
}/