aboutsummaryrefslogtreecommitdiff
path: root/actions/unmake_translation_editor.php
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-03-15 14:58:52 -0300
committerSilvio Rhatto <rhatto@riseup.net>2014-03-15 14:58:52 -0300
commit2d9b20157957a55bd83875775085ed31c9062577 (patch)
treef051d6d805a3448ea243379a2457be8d67dcfa5f /actions/unmake_translation_editor.php
downloadelgg-2d9b20157957a55bd83875775085ed31c9062577.tar.gz
elgg-2d9b20157957a55bd83875775085ed31c9062577.tar.bz2
Squashed 'mod/translation_editor/' content from commit 9d86955
git-subtree-dir: mod/translation_editor git-subtree-split: 9d86955e6d8b6807578f5a9da0346ac1a146881c
Diffstat (limited to 'actions/unmake_translation_editor.php')
-rw-r--r--actions/unmake_translation_editor.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/actions/unmake_translation_editor.php b/actions/unmake_translation_editor.php
new file mode 100644
index 000000000..1872d7f6c
--- /dev/null
+++ b/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);