aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author3D-I <480857+3D-I@users.noreply.github.com>2020-01-09 23:54:40 +0100
committer3D-I <480857+3D-I@users.noreply.github.com>2020-01-09 23:55:47 +0100
commita2fa918da2f24771e4d1fd68fcadc514bb2aa900 (patch)
treeafa6c0c43bb647771df0b2630609a5130b2352bc
parentMerge pull request #5823 from JoshyPHP/ticket/16309 (diff)
downloadphpbb-a2fa918da2f24771e4d1fd68fcadc514bb2aa900.tar.gz
phpbb-a2fa918da2f24771e4d1fd68fcadc514bb2aa900.tar.bz2
phpbb-a2fa918da2f24771e4d1fd68fcadc514bb2aa900.zip
[ticket/16308] Fix UCP reset password
PHPBB3-16308
-rw-r--r--phpBB/phpbb/ucp/controller/reset_password.php7
-rw-r--r--phpBB/styles/prosilver/template/ucp_reset_password.html2
2 files changed, 3 insertions, 6 deletions
diff --git a/phpBB/phpbb/ucp/controller/reset_password.php b/phpBB/phpbb/ucp/controller/reset_password.php
index 5c27c4f414..8877a33ba9 100644
--- a/phpBB/phpbb/ucp/controller/reset_password.php
+++ b/phpBB/phpbb/ucp/controller/reset_password.php
@@ -424,12 +424,9 @@ class reset_password
}
}
- if (!empty($errors))
- {
- $this->template->assign_block_vars_array('PASSWORD_RESET_ERRORS', array_map([$this->language, 'lang'], $errors));
- }
-
$this->template->assign_vars([
+ 'S_PASSWORD_RESET_ERRORS' => (bool) !empty($errors),
+ 'PASSWORD_RESET_ERRORS' => implode('<br>', array_map([$this->language, 'lang'], $errors)),
'S_IS_PASSWORD_RESET' => true,
'U_RESET_PASSWORD_ACTION' => $this->helper->route('phpbb_ucp_reset_password_controller'),
'S_HIDDEN_FIELDS' => build_hidden_fields([
diff --git a/phpBB/styles/prosilver/template/ucp_reset_password.html b/phpBB/styles/prosilver/template/ucp_reset_password.html
index 0a05f69aed..5273d30d0f 100644
--- a/phpBB/styles/prosilver/template/ucp_reset_password.html
+++ b/phpBB/styles/prosilver/template/ucp_reset_password.html
@@ -10,7 +10,7 @@
<fieldset>
{% if S_IS_PASSWORD_RESET %}
- {% if PASSWORD_RESET_ERRORS %}<p class="error">{{ PASSWORD_RESET_ERRORS | join('<br>') }}</p>{% endif %}
+ {% if S_PASSWORD_RESET_ERRORS %}<p class="error">{{ PASSWORD_RESET_ERRORS }}</p>{% endif %}
<dl>
<dt><label for="new_password">{{ lang('NEW_PASSWORD') ~ lang('COLON') }}</label></dt>
<dd><input type="password" name="new_password" id="new_password" size="25" maxlength="255" title="{{ lang('CHANGE_PASSWORD') }}" autocomplete="off" /></dd>