aboutsummaryrefslogtreecommitdiff
path: root/mod/translation_editor/actions/unmake_translation_editor.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/translation_editor/actions/unmake_translation_editor.php')
-rw-r--r--mod/translation_editor/actions/unmake_translation_editor.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/mod/translation_editor/actions/unmake_translation_editor.php b/mod/translation_editor/actions/unmake_translation_editor.php
new file mode 100644
index 000000000..1872d7f6c
--- /dev/null
+++ b/mod/translation_editor/actions/unmake_translation_editor.php
@@ -0,0 +1,20 @@
+<?php
+
+ admin_gatekeeper();
+
+ $result = false;
+
+ $user = get_input("user");
+ $user = get_entity($user);
+
+ if($user instanceof ElggUser){
+ unset($user->translation_editor);
+ $result = true;
+ }
+
+ if(!$result){
+ register_error(elgg_echo("translation_editor:action:unmake_translation_editor:error"));
+ } else {
+ system_message(elgg_echo("translation_editor:action:unmake_translation_editor:success"));
+ }
+ forward(REFERER);