Skip to content

Commit e033a4a

Browse files
committed
Updated auth controller to use error message from language files instead
of being hardcoded.
1 parent e7cff1a commit e033a4a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

controllers/auth.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,10 @@ function forgot_password()
212212
$identity = $this->db->where('email', $this->input->post('email'))->limit('1')->get($config_tables['users'])->row();
213213

214214
if(empty($identity)) {
215-
$this->session->set_flashdata('message', 'No record of that email address.');
215+
$this->ion_auth->set_message('forgot_password_email_not_found');
216+
$this->session->set_flashdata('message', $this->ion_auth->messages());
216217
redirect("auth/forgot_password", 'refresh');
217-
}
218+
}
218219

219220
//run the forgotten password method to email an activation code to the user
220221
$forgotten = $this->ion_auth->forgotten_password($identity->{$this->config->item('identity', 'ion_auth')});

0 commit comments

Comments
 (0)