diff --git a/application/models/Secretaries_model.php b/application/models/Secretaries_model.php index 33502e445..b13621f64 100644 --- a/application/models/Secretaries_model.php +++ b/application/models/Secretaries_model.php @@ -79,7 +79,7 @@ public function save(array $secretary): int public function validate(array $secretary) { // If a secretary ID is provided then check whether the record really exists in the database. - if (!empty($provider['id'])) { + if (!empty($secretary['id'])) { $count = $this->db->get_where('users', ['id' => $secretary['id']])->num_rows(); if (!$count) {