mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-27 01:24:16 +00:00
Displaying errors on user login failures
This commit is contained in:
@@ -305,13 +305,11 @@ class User extends CI_Controller {
|
||||
$this->form_validation->set_rules('user_name', 'Username', 'required');
|
||||
$this->form_validation->set_rules('user_password', 'Password', 'required');
|
||||
|
||||
$data = $query->row();
|
||||
|
||||
|
||||
if ($this->form_validation->run() == FALSE)
|
||||
{
|
||||
|
||||
//$data['page_title'] = Login;
|
||||
$data['page_title'] = "Login";
|
||||
|
||||
$this->load->view('layout/header', $data);
|
||||
$this->load->view('user/login');
|
||||
@@ -324,7 +322,7 @@ class User extends CI_Controller {
|
||||
$this->user_model->update_session($data->user_id);
|
||||
redirect('dashboard');
|
||||
} else {
|
||||
$this->session->set_flashdata('notice', 'Incorrect username or password!');
|
||||
$this->session->set_flashdata('error', 'Incorrect username or password!');
|
||||
redirect('user/login');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user