From a2fa918da2f24771e4d1fd68fcadc514bb2aa900 Mon Sep 17 00:00:00 2001 From: 3D-I <480857+3D-I@users.noreply.github.com> Date: Thu, 9 Jan 2020 23:54:40 +0100 Subject: [PATCH] [ticket/16308] Fix UCP reset password PHPBB3-16308 --- phpBB/phpbb/ucp/controller/reset_password.php | 7 ++----- phpBB/styles/prosilver/template/ucp_reset_password.html | 2 +- 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('
', 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 @@
{% if S_IS_PASSWORD_RESET %} - {% if PASSWORD_RESET_ERRORS %}

{{ PASSWORD_RESET_ERRORS | join('
') }}

{% endif %} + {% if S_PASSWORD_RESET_ERRORS %}

{{ PASSWORD_RESET_ERRORS }}

{% endif %}