. * */ // Check user and app status OCP\JSON::checkAdminUser(); OCP\JSON::checkAppEnabled('user_ldap'); OCP\JSON::callCheck(); $subject = $_POST['ldap_clear_mapping']; if(\OCA\user_ldap\lib\Helper::clearMapping($subject)) { OCP\JSON::success(); } else { $l=OC_L10N::get('user_ldap'); OCP\JSON::error(array('message' => $l->t('Failed to clear the mappings.'))); }