aboutsummaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2011-12-24 07:45:22 -0500
committerCash Costello <cash.costello@gmail.com>2011-12-24 07:45:22 -0500
commite357d172fa71f9b940ed35df0dd5ee6eb6777d5a (patch)
tree89d302d4e2778ed1b831fccb4da9e05454fd7414 /actions
parent1c2735807961ce916c27832327a07ef0bc9d5a40 (diff)
downloadelgg-e357d172fa71f9b940ed35df0dd5ee6eb6777d5a.tar.gz
elgg-e357d172fa71f9b940ed35df0dd5ee6eb6777d5a.tar.bz2
Fixes #3272 added button to revert avatar
Diffstat (limited to 'actions')
-rw-r--r--actions/avatar/revert.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/actions/avatar/revert.php b/actions/avatar/revert.php
new file mode 100644
index 000000000..8cff40a68
--- /dev/null
+++ b/actions/avatar/revert.php
@@ -0,0 +1,15 @@
+<?php
+/**
+ * Avatar revert action
+ */
+
+$guid = get_input('guid');
+$user = get_entity($guid);
+if ($user) {
+ unset($user->icontime);
+ system_message(elgg_echo('avatar:revert:success'));
+} else {
+ register_error(elgg_echo('avatar:revert:fail'));
+}
+
+forward(REFERER);