aboutsummaryrefslogtreecommitdiff
path: root/actions/user/passwordreset.php
blob: c6d8a70b1ac64568ae468342be823a8e34338e81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
/**
 * Action to reset a password and send success email.
 *
 * @package Elgg
 * @subpackage Core
 * @author Curverider Ltd
 * @link http://elgg.org/
 */

require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
global $CONFIG;

$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;