No password change in testing mode (#2073)

This commit is contained in:
jekkos
2018-08-17 23:54:47 +02:00
parent 76c63f6a60
commit f20ba23640
2 changed files with 5 additions and 3 deletions

View File

@@ -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(

View File

@@ -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();