diff --git a/application/models/Secretaries_model.php b/application/models/Secretaries_model.php index 33502e44..b13621f6 100644 --- a/application/models/Secretaries_model.php +++ b/application/models/Secretaries_model.php @@ -79,7 +79,7 @@ class Secretaries_model extends EA_Model 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) {