From 796ee8c4c0cc7b105c6fd4c0e43d40c9e898bb43 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Wed, 8 May 2013 17:47:07 +0200 Subject: LDAP: Implement clear mappings functionality --- apps/user_ldap/ajax/clearMappings.php | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 apps/user_ldap/ajax/clearMappings.php (limited to 'apps/user_ldap/ajax') diff --git a/apps/user_ldap/ajax/clearMappings.php b/apps/user_ldap/ajax/clearMappings.php new file mode 100644 index 00000000000..5dab39839b6 --- /dev/null +++ b/apps/user_ldap/ajax/clearMappings.php @@ -0,0 +1,35 @@ +. + * + */ + +// 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.'))); +} \ No newline at end of file -- cgit v1.2.3