Allow password change with no restriction (#1894)

This commit is contained in:
FrancescoUK
2018-03-24 21:47:10 +00:00
parent bf76450ca5
commit 4f2b6badd9
3 changed files with 16 additions and 16 deletions

View File

@@ -210,20 +210,5 @@ class Employees extends Persons
echo json_encode(array('success' => FALSE, 'message' => $this->lang->line('employees_cannot_be_deleted')));
}
}
/*
Loads the change password form
*/
public function change_password($employee_id = -1)
{
$person_info = $this->Employee->get_info($employee_id);
foreach(get_object_vars($person_info) as $property => $value)
{
$person_info->$property = $this->xss_clean($value);
}
$data['person_info'] = $person_info;
$this->load->view('employees/form_change_password', $data);
}
}
?>

View File

@@ -18,5 +18,20 @@ class Home extends Secure_Controller
{
$this->Employee->logout();
}
/*
Loads the change password form
*/
public function change_password($employee_id = -1)
{
$person_info = $this->Employee->get_info($employee_id);
foreach(get_object_vars($person_info) as $property => $value)
{
$person_info->$property = $this->xss_clean($value);
}
$data['person_info'] = $person_info;
$this->load->view('employees/form_change_password', $data);
}
}
?>

View File

@@ -98,7 +98,7 @@
</div>
<div class="navbar-right" style="margin:0">
<?php echo anchor('employees/change_password/'.$user_info->person_id, $user_info->first_name . ' ' . $user_info->last_name, array('class' => 'modal-dlg', 'data-btn-submit' => 'Submit', 'title' => $this->lang->line('employees_change_password'))); ?>
<?php echo anchor('home/change_password/'.$user_info->person_id, $user_info->first_name . ' ' . $user_info->last_name, array('class' => 'modal-dlg', 'data-btn-submit' => 'Submit', 'title' => $this->lang->line('employees_change_password'))); ?>
<?php echo ' | ' . ($this->input->get('debug') == 'true' ? $this->session->userdata('session_sha1') . ' | ' : ''); ?>
<?php echo anchor('home/logout', $this->lang->line('common_logout')); ?>
</div>