Code Duplication    Length = 5-5 lines in 2 locations

web_interface/astpp/application/modules/accounts/models/accounts_model.php 2 locations

@@ 135-139 (lines=5) @@
132
			$this->db_model->build_batch_update_array($update_array);
133
			$login_type = $this->session->userdata('logintype');
134
			$reseller_info = $this->session->userdata['accountinfo'];
135
			if ($reseller_info['type'] == 1) {
136
				$this->db->where('reseller_id', $reseller_info['id']);
137
			} else {
138
				$this->db->where('reseller_id', '0');
139
			}
140
			$this->db->where('type', '1');
141
			$this->db->update("accounts");
142
			$this->db_model->build_search('reseller_list_search');
@@ 198-202 (lines=5) @@
195
		$date = gmdate("Y-m-d h:i:s");
196
		$this->db_model->build_search('customer_list_search');
197
		$reseller_info = $this->session->userdata['accountinfo'];
198
		if ($reseller_info['type'] == 1) {
199
			$this->db->where('reseller_id', $reseller_info['id']);
200
		} else {
201
			$this->db->where('reseller_id', '0');
202
		}
203
		$this->db_model->build_search('customer_list_search');
204
		$this->db->where('type !=', '1');
205
		$this->db_model->build_batch_update_array($update_array);