aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/users.php11
-rw-r--r--views/default/forms/user/passwordreset.php13
2 files changed, 15 insertions, 9 deletions
diff --git a/engine/lib/users.php b/engine/lib/users.php
index 1d0429760..638e96aab 100644
--- a/engine/lib/users.php
+++ b/engine/lib/users.php
@@ -772,7 +772,6 @@ function execute_new_password_request($user_guid, $conf_code) {
* @return void
*/
function elgg_user_resetpassword_page_handler($page) {
- global $CONFIG;
$user_guid = get_input('u');
$code = get_input('c');
@@ -785,12 +784,18 @@ function elgg_user_resetpassword_page_handler($page) {
forward();
}
- $form = elgg_view_form('user/passwordreset', array(), array('user' => $user));
+ $params = array(
+ 'guid' => $user_guid,
+ 'code' => $code,
+ );
+ $form = elgg_view_form('user/passwordreset', array(), $params);
$title = elgg_echo('resetpassword');
$content = elgg_view_title(elgg_echo('resetpassword')) . $form;
- echo elgg_view_page($title, elgg_view_layout('one_column', array('content' => $content)));
+ $body = elgg_view_layout('one_column', array('content' => $content));
+
+ echo elgg_view_page($title, $body);
}
/**
diff --git a/views/default/forms/user/passwordreset.php b/views/default/forms/user/passwordreset.php
index 7b13f120c..3c89776f6 100644
--- a/views/default/forms/user/passwordreset.php
+++ b/views/default/forms/user/passwordreset.php
@@ -1,19 +1,20 @@
<?php
+/**
+ * Reset user password form
+ */
-$user = $vars['user'];
-
-echo elgg_echo('user:resetpassword:reset_password_confirm') . "<br />";
+echo autop(elgg_echo('user:resetpassword:reset_password_confirm'));
echo elgg_view('input/hidden', array(
'name' => 'u',
- 'value' => $user->guid
+ 'value' => $vars['guid'],
));
echo elgg_view('input/hidden', array(
'name' => 'c',
- 'value' => $code
+ 'value' => $vars['code'],
));
echo elgg_view('input/submit', array(
'value' => elgg_echo('resetpassword')
-)); \ No newline at end of file
+));