. * */ // Check user and app status OCP\JSON::checkAdminUser(); OCP\JSON::checkAppEnabled('user_ldap'); OCP\JSON::callCheck(); $prefix = $_POST['ldap_serverconfig_chooser']; if(\OCA\user_ldap\lib\Helper::deleteServerConfiguration($prefix)){ OCP\JSON::success(); } else { OCP\JSON::error('Failed to delete the server configuration'); }