/** * Must be called by XHR * Called by User Edition form Validation * * Returns 1 if true, 0 if false * */ function check_email_exists() { $id_user = $this->input->post('id_user'); $email = $this->input->post('email'); $exists = $this->user_model->user_with_same_email_exists($email, $id_user); $this->xhr_output($exists); }