public function check_email_existence() { // Get the application object. $app = JFactory::getApplication(); $email = JRequest::getString('email'); $exist = ideary::checkEmailExistence($email); echo json_encode(array('exist' => $exist)); $app->close(); }