mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-05-24 08:20:54 -04:00
No password change in testing mode (#2073)
This commit is contained in:
@@ -121,7 +121,7 @@ class Employees extends Persons
|
||||
}
|
||||
|
||||
//Password has been changed OR first time password set
|
||||
if($this->input->post('password') != '')
|
||||
if($this->input->post('password') != '' && ENVIRONMENT != 'testing')
|
||||
{
|
||||
$exploded = explode(":", $this->input->post('language'));
|
||||
$employee_data = array(
|
||||
|
||||
@@ -119,11 +119,9 @@ class Employee extends Person
|
||||
//Now insert the new grants
|
||||
if($success)
|
||||
{
|
||||
$count = 0;
|
||||
foreach($grants_data as $grant)
|
||||
{
|
||||
$success = $this->db->insert('grants', array('permission_id' => $grant['permission_id'], 'person_id' => $employee_id, 'menu_group' => $grant['menu_group']));
|
||||
$count = $count+ 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -473,6 +471,10 @@ class Employee extends Person
|
||||
{
|
||||
$success = FALSE;
|
||||
|
||||
if (ENVIRONMENT == 'testing') {
|
||||
return $success;
|
||||
}
|
||||
|
||||
//Run these queries as a transaction, we want to make sure we do all or nothing
|
||||
$this->db->trans_start();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user