Ejemplo n.º 1
0
<?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;
Ejemplo n.º 2
0
 static function forgotPasswordConfirm($input)
 {
     $userGuid = (int) $input["userGuid"];
     $code = (int) $input["code"];
     if (!execute_new_password_request($userGuid, $code)) {
         throw new Exception("unknown_error");
     }
     return ["status" => "ok"];
 }