mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-05-14 10:43:56 -04:00
Allow password change with no restriction (#1894)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user