aboutsummaryrefslogtreecommitdiff
path: root/actions/user/passwordreset.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/user/passwordreset.php')
-rw-r--r--actions/user/passwordreset.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/actions/user/passwordreset.php b/actions/user/passwordreset.php
new file mode 100644
index 000000000..201d6abcf
--- /dev/null
+++ b/actions/user/passwordreset.php
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Action to reset a password and send success email.
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+
+$user_guid = get_input('u');
+$code = get_input('c');
+
+if (execute_new_password_request($user_guid, $code)) {
+ system_message(elgg_echo('user:password:success'));
+} else {
+ register_error(elgg_echo('user:password:fail'));
+}
+
+forward();
+exit;